Skip to content

Commit 482cc22

Browse files
Update tree-sitter-sql and improve highlight queries (#5683)
1 parent 2c6bf6f commit 482cc22

2 files changed

Lines changed: 12 additions & 18 deletions

File tree

languages.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1434,7 +1434,7 @@ injection-regex = "sql"
14341434

14351435
[[grammar]]
14361436
name = "sql"
1437-
source = { git = "https://github.com/DerekStride/tree-sitter-sql", rev = "2743c7b5e710e6854d4e8c14c302548b436e2a1f" }
1437+
source = { git = "https://github.com/DerekStride/tree-sitter-sql", rev = "4fe05b2d81565ddb689d2f415e07afdacc515c52" }
14381438

14391439
[[language]]
14401440
name = "gdscript"

runtime/queries/sql/highlights.scm

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,33 +42,25 @@
4242
"."
4343
] @punctuation.delimiter
4444

45-
[
46-
"*"
47-
"+"
48-
"-"
49-
"/"
50-
"%"
51-
"^"
52-
"||"
53-
"="
54-
"<"
55-
"<="
56-
"!="
57-
">="
58-
">"
59-
] @operator
45+
(binary_expression
46+
operator: _ @operator)
47+
48+
(unary_expression
49+
operator: _ @operator)
50+
51+
(all_fields) @special
6052

6153
[
6254
(keyword_null)
6355
(keyword_true)
6456
(keyword_false)
6557
] @constant.builtin
6658

67-
(literal) @string
68-
6959
((literal) @constant.numeric
7060
(#match? @constant.numeric "^(-?\d*\.?\d*)$"))
7161

62+
(literal) @string
63+
7264
[
7365
(keyword_select)
7466
(keyword_delete)
@@ -146,6 +138,8 @@
146138
(keyword_commit)
147139
(keyword_rollback)
148140
(keyword_transaction)
141+
(keyword_group_concat)
142+
(keyword_separator)
149143
] @keyword
150144

151145
[

0 commit comments

Comments
 (0)