Skip to content

Commit 126ae64

Browse files
azizkprincemaple
authored andcommitted
SQL: explicitly include source.sql#comments to make them work again.
* Reason: the comments context has been moved to the prototype context. * Renamed comment to nested-comment. * Fixed tests accordingly.
1 parent d701d4f commit 126ae64

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

syntaxes/SQL (Elixir).sublime-syntax

+4-3
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ contexts:
6565
16: punctuation.comma.sql
6666
17: punctuation.terminator.sql
6767
68-
- include: comment
68+
- include: nested-comment
69+
- include: scope:source.sql#comments
6970
- include: scope:source.sql
7071

7172
- match: |
@@ -80,12 +81,12 @@ contexts:
8081
4: punctuation.separator.decimal.sql
8182
5: punctuation.separator.decimal.sql
8283
83-
comment:
84+
nested-comment:
8485
- match: /\*
8586
scope: punctuation.definition.comment.sql
8687
push:
8788
- meta_scope: comment.block.sql
8889
# Comments can be nested.
89-
- include: comment
90+
- include: nested-comment
9091
- match: \*/
9192
pop: 1

tests/syntax_test_sql_fragments.ex

+3-3
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ fragment("t AT TIME ZONE")
262262
# ^^^^^^^ keyword.other.sql
263263
# ^^^ keyword.other.sql
264264
# ^^^^^ keyword.other.sql
265-
# ^^^^^ constant.boolean.sql
265+
# ^^^^^ constant.language.boolean.sql
266266
# ^^^^^^ keyword.other.sql
267267
# ^^^ keyword.other.DML.sql
268268
# ^^^^ keyword.other.DML.sql
@@ -285,7 +285,7 @@ fragment("t AT TIME ZONE")
285285
# ^^^^ keyword.other.sql
286286
# ^^ keyword.other.sql
287287
# ^^^^^^ keyword.other.sql
288-
# ^^^^ constant.language.sql
288+
# ^^^^ constant.language.null.sql
289289
# ^^^ keyword.other.sql
290290
# ^^^^^^^ keyword.other.sql
291291
# ^^^^^^^^^^^^^^ support.function.scalar.sql
@@ -305,7 +305,7 @@ fragment("t AT TIME ZONE")
305305
SOME; SYMMETRIC; TABLE; TABLESAMPLE; THEN; TO; TRAILING; TRUE; UNION; UNIQUE;
306306
# ^^^^^^ keyword.other.sql
307307
# ^^^^^ keyword.other.DML.sql
308-
# ^^^^ constant.boolean.sql
308+
# ^^^^ constant.language.boolean.sql
309309
# ^^^^^^^^ keyword.other.sql
310310
# ^^ keyword.other.sql
311311
# ^^^^ keyword.other.DML.sql

0 commit comments

Comments
 (0)