-
Notifications
You must be signed in to change notification settings - Fork 591
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Go] add support for TSQL in language injections
- Loading branch information
1 parent
cc2a871
commit 1f5edee
Showing
4 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
%YAML 1.2 | ||
--- | ||
name: Go (Embedded T-SQL) | ||
scope: source.go.embedded-backtick-string.tsql | ||
version: 2 | ||
hidden: true | ||
|
||
extends: Packages/Go/Embeddings/Go (Embedded Backtick String).sublime-syntax | ||
|
||
contexts: | ||
match-raw-string: | ||
# replaces Go.sublime-syntax#match-raw-string | ||
- match: '`' | ||
scope: meta.string.go string.quoted.backtick.go punctuation.definition.string.begin.go | ||
embed: scope:source.tsql.go-embedded-backtick-string | ||
embed_scope: meta.string.go meta.embedded.go source.sql.embedded.go | ||
escape: '`' | ||
escape_captures: | ||
0: meta.string.go string.quoted.backtick.go punctuation.definition.string.end.go |
21 changes: 21 additions & 0 deletions
21
Go/Embeddings/TSQL (for Go Embedded Backtick Strings).sublime-syntax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
%YAML 1.2 | ||
--- | ||
name: T-SQL inside Go backtick string | ||
scope: source.tsql.go-embedded-backtick-string | ||
version: 2 | ||
hidden: true | ||
|
||
extends: Packages/SQL/TSQL.sublime-syntax | ||
|
||
contexts: | ||
prototype: | ||
- meta_prepend: true | ||
- include: scope:source.go#match-raw-text-content | ||
|
||
string-escape: | ||
- meta_prepend: true | ||
- include: scope:source.go#match-raw-string-content | ||
|
||
string-interpolation: | ||
- meta_prepend: true | ||
- include: scope:source.go#match-raw-string-content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters