on master help sign in
Improvements to Meson syntax. (#4572)

Co-authored-by: Garrett D'Amore <garrett.damore@weka.io> Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

commitf843967059fc36bf497bde31ce9ed18b1354f1eb authorGarrett D'Amore <garrett@damore.org> dateTue 15 Nov 2022, 18:17 (4 years ago) parent70ebbd0
3 files changed+51−50
languages.toml+1−1 runtime/queries/meson/highlights.scm+46−46 runtime/queries/meson/indents.scm+4−3
languages.toml+1−1
@@ -1510,7 +1510,7 @@ indent = { tab-width = 2, unit = " " }
15101510
15111511[[grammar]]
15121512name = "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" }
15141514
15151515[[language]]
15161516name = "sshclientconfig"
runtime/queries/meson/highlights.scm+46−46
@@ -1,62 +1,62 @@
1−(string_literal) @string
1+(comment) @comment
22
3−(boolean_literal) @constant.builtin.boolean
4−(integer_literal) @constant.numeric.integer
5−
6−(comment) @comment.line
7−(function_id) @function
8−(keyword_arg_key) @variable.other.member
9−(id_expression) @variable
3+; these are listed first, because they override keyword queries
4+(function_expression (identifier) @function)
105
116[
12− "if"
13− "elif"
14− "else"
15− "endif"
16−] @keyword.control.conditional
7+ (assignment_operator)
8+ (additive_operator)
9+ (multiplicative_operator)
10+ (equality_operator)
11+ ">="
12+ "<="
13+ "<"
14+ ">"
15+ "+"
16+ "-"
17+] @operator
1718
1819[
19− "foreach"
20− "endforeach"
21−] @keyword.control.repeat
20+ (and)
21+ (or)
22+ (not)
23+ (in)
24+] @keyword.operator
2225
2326[
24− "break"
25− "continue"
26−] @keyword.control
27+ "(" ")" "[" "]" "{" "}"
28+] @punctuation.bracket
2729
2830[
29− "not"
30− "in"
31− "and"
32− "or"
33−] @keyword.operator
31+ (if)
32+ (elif)
33+ (else)
34+ (endif)
35+] @keyword.control.conditional
3436
3537[
36− "!"
37− "+"
38− "-"
39− "*"
40− "/"
41− "%"
42− "=="
43− "!="
44− ">"
45− "<"
46− ">="
47− "<="
48−] @operator
38+ (foreach)
39+ (endforeach)
40+ (break)
41+ (continue)
42+] @keyword.control.repeat
43+
44+(boolean_literal) @constant.builtin.boolean
45+(int_literal) @constant.numeric.integer
46+
47+(keyword_argument keyword: (identifier) @variable.parameter)
48+(escape_sequence) @constant.character.escape
49+(bad_escape) @warning
4950
5051[
51− ":"
52− ","
52+"."
53+","
54+":"
5355] @punctuation.delimiter
5456
5557[
56− "("
57− ")"
58− "["
59− "]"
60− "{"
61− "}"
62−] @punctuation.bracket
58+ (string_literal)
59+ (fstring_literal)
60+] @string
61+
62+(identifier) @variable
runtime/queries/meson/indents.scm+4−3
@@ -1,5 +1,5 @@
1+; Indentation queries for helix
12[
2− (method_expression)
33 (function_expression)
44 (array_literal)
55 (dictionary_literal)
@@ -7,10 +7,11 @@
77 (iteration_statement)
88] @indent
99
10+; question - what about else, elif
1011[
1112 ")"
1213 "]"
1314 "}"
14− "endif"
15− "endforeach"
15+ (endif)
16+ (endforeach)
1617] @outdent