@@ -1,23 +1,41 @@
1−(const_literal) @constant.numeric
1+(int_literal) @constant.numeric.integer
2+(float_literal) @constant.numeric.float
3+(bool_literal) @constant.builtin.boolean
24
3−(type_declaration) @type
5+(global_constant_declaration) @variable
6+(global_variable_declaration) @variable
7+(compound_statement) @variable
8+(const_expression) @function
9+
10+(variable_identifier_declaration
11+ (identifier) @variable
12+ (type_declaration) @type)
413
514(function_declaration
6− (identifier) @function)
15+ (identifier) @function
16+ (function_return_type_declaration
17+ (type_declaration) @type))
18+
19+(parameter
20+ (variable_identifier_declaration
21+ (identifier) @variable.parameter
22+ (type_declaration) @type))
723
824(struct_declaration
925 (identifier) @type)
26+
27+(struct_declaration
28+ (struct_member
29+ (variable_identifier_declaration
30+ (identifier) @variable.other.member
31+ (type_declaration) @type)))
1032
1133(type_constructor_or_function_call_expression
1234 (type_declaration) @function)
1335
14−(parameter
15− (variable_identifier_declaration (identifier) @variable.parameter))
16−
1736[
1837 "struct"
1938 "bitcast"
20− ; "block"
2139 "discard"
2240 "enable"
2341 "fallthrough"
@@ -26,36 +44,28 @@
2644 "private"
2745 "read"
2846 "read_write"
29− "return"
3047 "storage"
3148 "type"
3249 "uniform"
3350 "var"
3451 "workgroup"
3552 "write"
53+ "override"
3654 (texel_format)
37−] @keyword ; TODO reserved keywords
55+] @keyword
3856
39−[
40− (true)
41− (false)
42−] @constant.builtin.boolean
57+"fn" @keyword.function
4358
44−[ "," "." ":" ";" ] @punctuation.delimiter
59+"return" @keyword.control.return
4560
46−;; brackets
47−[
48− "("
49− ")"
50− "["
51− "]"
52− "{"
53− "}"
54−] @punctuation.bracket
61+["," "." ":" ";"] @punctuation.delimiter
62+
63+["(" ")" "[" "]" "{" "}"] @punctuation.bracket
5564
5665[
5766 "loop"
5867 "for"
68+ "while"
5969 "break"
6070 "continue"
6171 "continuing"
@@ -64,7 +74,6 @@
6474[
6575 "if"
6676 "else"
67− "elseif"
6877 "switch"
6978 "case"
7079 "default"
@@ -92,10 +101,13 @@
92101 "*"
93102 "~"
94103 "^"
104+ "@"
105+ "++"
106+ "--"
95107] @operator
96108
97109(attribute
98− (identifier) @variable.other.member)
110+ (identifier) @attribute)
99111
100112(comment) @comment
101113