on master help sign in
feat: update prql parser (#7771)
commit224fd5fa29e43c5b2543ab791de5f46abe1ae8a7 authorMatthias Q <35303817+matthias-Q@users.noreply.github.com> dateFri 28 Jul 2023, 23:01 (3 years ago) parent9a4890f
2 files changed+20−13
languages.toml+1−1 runtime/queries/prql/highlights.scm+19−12
languages.toml+1−1
@@ -2460,7 +2460,7 @@ indent = { tab-width = 4, unit = " " }
24602460
24612461[[grammar]]
24622462name = "prql"
2463−source = { git = "https://github.com/PRQL/tree-sitter-prql", rev = "3f27cac466f030ee7d985d91eba5470e01dd21ea" }
2463+source = { git = "https://github.com/PRQL/tree-sitter-prql", rev = "09e158cd3650581c0af4c49c2e5b10c4834c8646" }
24642464
24652465[[language]]
24662466name = "po"
runtime/queries/prql/highlights.scm+19−12
@@ -9,7 +9,7 @@
99 (keyword_window)
1010 (keyword_join)
1111 (keyword_select)
12− (keyword_switch)
12+ (keyword_case)
1313 (keyword_append)
1414 (keyword_remove)
1515 (keyword_intersect)
@@ -19,6 +19,7 @@
1919 (keyword_let)
2020 (keyword_prql)
2121 (keyword_from_text)
22+ (keyword_loop)
2223] @keyword
2324
2425(literal) @string
@@ -33,8 +34,6 @@ alias: (identifier) @variable.other.member
3334
3435(comment) @comment
3536
36−(keyword_func) @keyword.function
37−
3837(function_call
3938 (identifier) @function)
4039
@@ -50,21 +49,25 @@ alias: (identifier) @variable.other.member
5049 "!="
5150 ">="
5251 ">"
53− "->"
52+ "&&"
53+ "||"
54+ "//"
55+ "~="
5456 (bang)
5557] @operator
5658
5759[
5860 "("
5961 ")"
60− "["
61− "]"
62+ "{"
63+ "}"
6264] @punctuation.bracket
6365
6466[
6567 ","
6668 "."
6769 (pipe)
70+ "->"
6871] @punctuation.delimiter
6972
7073(literal
@@ -87,6 +90,15 @@ alias: (identifier) @variable.other.member
8790 (keyword_sum)
8891 (keyword_stddev)
8992 (keyword_count)
93+ (keyword_lag)
94+ (keyword_lead)
95+ (keyword_first)
96+ (keyword_last)
97+ (keyword_rank)
98+ (keyword_row_number)
99+ (keyword_round)
100+ (keyword_all)
101+ (keyword_map)
90102] @function
91103
92104[
@@ -119,13 +131,8 @@ alias: (identifier) @variable.other.member
119131 (keyword_false)
120132] @constant.builtin.boolean
121133
122−[
123− (keyword_and)
124− (keyword_or)
125−] @keyword.operator
126−
127134(function_definition
128− (keyword_func)
135+ (keyword_let)
129136 name: (identifier) @function)
130137
131138(parameter