@@ -1,83 +1,112 @@
1+(comment) @comment
2+
3+(module_clause
4+ (identifier) @namespace)
5+
6+(import_path
7+ (import_name) @namespace)
8+
9+(import_alias
10+ (import_name) @namespace)
11+
12+(enum_fetch
13+ (reference_expression) @constant)
14+
15+(enum_field_definition
16+ (identifier) @constant)
17+
18+(global_var_definition
19+ (identifier) @constant)
20+
21+(compile_time_if_expression
22+ condition: (reference_expression) @constant)
23+
24+(compile_time_if_expression
25+ condition: (binary_expression
26+ left: (reference_expression) @constant
27+ right: (reference_expression) @constant))
28+
29+(compile_time_if_expression
30+ condition: (binary_expression
31+ left: (reference_expression) @constant
32+ right: (unary_expression (reference_expression) @constant)))
33+
34+(label_reference) @label
35+
136(parameter_declaration
2− name: (identifier) @variable.parameter)
37+ name: (identifier) @variable.parameter)
38+(receiver
39+ name: (identifier) @variable.parameter)
340(function_declaration
4− name: (identifier) @function)
41+ name: (identifier) @function)
542(function_declaration
6− receiver: (parameter_list)
7− name: (identifier) @function.method)
43+ receiver: (receiver)
44+ name: (identifier) @function.method)
45+(interface_method_definition
46+ name: (identifier) @function.method)
847
948(call_expression
10− function: (identifier) @function)
11−(call_expression
12− function: (selector_expression
13− field: (identifier) @function.method))
49+ name: (selector_expression
50+ field: (reference_expression) @function.method))
1451
15−(field_identifier) @variable.other.member
16−(selector_expression
17− operand: (identifier) @variable
18− field: (identifier) @variable.other.member)
52+(call_expression
53+ name: (reference_expression) @function)
1954
20−(int_literal) @constant.numeric.integer
55+(struct_declaration
56+ name: (identifier) @type)
2157
22−(attribute_declaration) @attribute
23−(comment) @comment
24−[
25− (c_string_literal)
26− (raw_string_literal)
27− (interpreted_string_literal)
28− (string_interpolation)
29− (rune_literal)
30−] @string
58+(enum_declaration
59+ name: (identifier) @type)
3160
32−(escape_sequence) @constant.character.escape
61+(interface_declaration
62+ name: (identifier) @type)
3363
34−[
35− (pointer_type)
36− (array_type)
37−] @type
64+(type_declaration
65+ name: (identifier) @type)
3866
39−(const_spec name: (identifier) @constant)
40−(global_var_type_initializer name: (identifier) @constant)
41−(global_var_spec name: (identifier) @constant)
42−((identifier) @constant (#match? @constant "^[A-Z][A-Z\\d_]*$"))
67+(struct_field_declaration
68+ name: (identifier) @variable.other.member)
4369
70+(field_name) @variable.other.member
4471
45−[
46− (generic_type)
47− (type_identifier)
48−] @constructor
72+(selector_expression
73+ field: (reference_expression) @variable.other.member)
4974
50−(builtin_type) @type.builtin
75+(int_literal) @constant.numeric.integer
76+(escape_sequence) @constant.character.escape
5177
5278[
53− (true)
54− (false)
55−] @constant.builtin.boolean
79+ (c_string_literal)
80+ (raw_string_literal)
81+ (interpreted_string_literal)
82+ (string_interpolation)
83+ (rune_literal)
84+] @string
5685
86+(string_interpolation
87+ (braced_interpolation_opening) @punctuation.bracket
88+ (interpolated_expression) @embedded
89+ (braced_interpolation_closing) @punctuation.bracket)
5790
58−[
59− (module_identifier)
60− (import_path)
61−] @namespace
91+(attribute) @attribute
6292
6393[
64− (pseudo_comptime_identifier)
65− (label_name)
66−] @label
94+ (type_reference_expression)
95+ ] @type
6796
6897[
69− (identifier)
70−] @variable
71−
98+ (true)
99+ (false)
100+] @constant.builtin.boolean
72101
73102[
74103 "pub"
75104 "assert"
76− "go"
77105 "asm"
78106 "defer"
79107 "unsafe"
80108 "sql"
109+ (nil)
81110 (none)
82111] @keyword
83112
@@ -105,12 +134,17 @@
105134 "lock"
106135 "rlock"
107136 "spawn"
137+ "break"
138+ "continue"
139+ "go"
108140] @keyword.control
109141
110142[
111143 "if"
144+ "$if"
112145 "select"
113146 "else"
147+ "$else"
114148 "match"
115149] @keyword.control.conditional
116150
@@ -155,7 +189,7 @@
155189 "]"
156190] @punctuation.bracket
157191
158−(array) @punctuation.bracket
192+(array_creation) @punctuation.bracket
159193
160194[
161195 "++"