on master help sign in
Improvements to Meson syntax. (#4572)
f843967Garrett D'Amore
languages.toml+1−1
@@ -1510,7 +1510,7 @@ indent = { tab-width = 2, unit = " " }
1510
1510
1511[[grammar]]
1511[[grammar]]
1512name = "meson"
1512name = "meson"
1513−source = { git = "https://github.com/bearcove/tree-sitter-meson", rev = "feea83be9225842490066522ced2d13eb9cce0bd" }
1513+source = { git = "https://github.com/staysail/tree-sitter-meson", rev = "32a83e8f200c347232fa795636cfe60dde22957a" }
1514
1514
1515[[language]]
1515[[language]]
1516name = "sshclientconfig"
1516name = "sshclientconfig"
runtime/queries/meson/highlights.scm+46−46
@@ -1,62 +1,62 @@
1−(string_literal) @string
1+(comment) @comment
2
2
3−(boolean_literal) @constant.builtin.boolean
3+; these are listed first, because they override keyword queries
4−(integer_literal) @constant.numeric.integer
4+(function_expression (identifier) @function)
5−
6−(comment) @comment.line
7−(function_id) @function
8−(keyword_arg_key) @variable.other.member
9−(id_expression) @variable
10
5
11[
6[
7+ (assignment_operator)
8+ (additive_operator)
9+ (multiplicative_operator)
10+ (equality_operator)
11+ ">="
12− "if"
12+ "<="
13− "elif"
13+ "<"
14− "else"
14+ ">"
15− "endif"
15+ "+"
16−] @keyword.control.conditional
16+ "-"
17+] @operator
17
18
18[
19[
19− "foreach"
20+ (and)
20− "endforeach"
21+ (or)
22+ (not)
23+ (in)
21−] @keyword.control.repeat
24+] @keyword.operator
22
25
23[
26[
24− "break"
27+ "(" ")" "[" "]" "{" "}"
25− "continue"
28+] @punctuation.bracket
26−] @keyword.control
27
29
28[
30[
29− "not"
31+ (if)
30− "in"
32+ (elif)
31− "and"
33+ (else)
32− "or"
34+ (endif)
33−] @keyword.operator
35+] @keyword.control.conditional
34
36
35[
37[
36− "!"
38+ (foreach)
37− "+"
39+ (endforeach)
38− "-"
40+ (break)
39− "*"
41+ (continue)
40− "/"
42+] @keyword.control.repeat
41− "%"
43+
42− "=="
44+(boolean_literal) @constant.builtin.boolean
43− "!="
45+(int_literal) @constant.numeric.integer
44− ">"
46+
45− "<"
47+(keyword_argument keyword: (identifier) @variable.parameter)
46− ">="
48+(escape_sequence) @constant.character.escape
47− "<="
49+(bad_escape) @warning
48−] @operator
49
50
50[
51[
52+"."
53+","
51− ":"
54+":"
52− ","
53] @punctuation.delimiter
55] @punctuation.delimiter
54
56
55[
57[
56− "("
58+ (string_literal)
57− ")"
59+ (fstring_literal)
58− "["
60+] @string
59− "]"
61+
60− "{"
62+(identifier) @variable
61− "}"
62−] @punctuation.bracket
runtime/queries/meson/indents.scm+4−3
@@ -1,5 +1,5 @@
1+; Indentation queries for helix
1[
2[
2− (method_expression)
3 (function_expression)
3 (function_expression)
4 (array_literal)
4 (array_literal)
5 (dictionary_literal)
5 (dictionary_literal)
@@ -7,10 +7,11 @@
7 (iteration_statement)
7 (iteration_statement)
8] @indent
8] @indent
9
9
10+; question - what about else, elif
10[
11[
11 ")"
12 ")"
12 "]"
13 "]"
13 "}"
14 "}"
14− "endif"
15+ (endif)
15− "endforeach"
16+ (endforeach)
16] @outdent
17] @outdent