| 1 |
[(line_comment) (block_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 |
|
| 36 |
(parameter_declaration |
| 37 |
name: (identifier) @variable.parameter) |
| 38 |
(receiver |
| 39 |
name: (identifier) @variable.parameter) |
| 40 |
(function_declaration |
| 41 |
name: (identifier) @function) |
| 42 |
(function_declaration |
| 43 |
receiver: (receiver) |
| 44 |
name: (identifier) @function.method) |
| 45 |
(interface_method_definition |
| 46 |
name: (identifier) @function.method) |
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
(field_name) @variable.other.member |
| 52 |
(selector_expression |
| 53 |
field: (reference_expression) @variable.other.member) |
| 54 |
|
| 55 |
(call_expression |
| 56 |
name: (selector_expression |
| 57 |
field: (reference_expression) @function.method)) |
| 58 |
|
| 59 |
(call_expression |
| 60 |
name: (reference_expression) @function) |
| 61 |
|
| 62 |
(struct_declaration |
| 63 |
name: (identifier) @type) |
| 64 |
|
| 65 |
(enum_declaration |
| 66 |
name: (identifier) @type) |
| 67 |
|
| 68 |
(interface_declaration |
| 69 |
name: (identifier) @type) |
| 70 |
|
| 71 |
(type_declaration |
| 72 |
name: (identifier) @type) |
| 73 |
|
| 74 |
(struct_field_declaration |
| 75 |
name: (identifier) @variable.other.member) |
| 76 |
|
| 77 |
(int_literal) @constant.numeric.integer |
| 78 |
(escape_sequence) @constant.character.escape |
| 79 |
|
| 80 |
[ |
| 81 |
(c_string_literal) |
| 82 |
(raw_string_literal) |
| 83 |
(interpreted_string_literal) |
| 84 |
(string_interpolation) |
| 85 |
(rune_literal) |
| 86 |
] @string |
| 87 |
|
| 88 |
(string_interpolation |
| 89 |
(interpolation_opening) @punctuation.bracket |
| 90 |
(interpolation_expression) @embedded |
| 91 |
(interpolation_closing) @punctuation.bracket) |
| 92 |
|
| 93 |
(attribute) @attribute |
| 94 |
|
| 95 |
[ |
| 96 |
(type_reference_expression) |
| 97 |
] @type |
| 98 |
|
| 99 |
[ |
| 100 |
(true) |
| 101 |
(false) |
| 102 |
] @constant.builtin.boolean |
| 103 |
(nil) @constant.builtin |
| 104 |
|
| 105 |
[ |
| 106 |
"pub" |
| 107 |
"assert" |
| 108 |
"asm" |
| 109 |
"defer" |
| 110 |
"unsafe" |
| 111 |
"sql" |
| 112 |
(none) |
| 113 |
] @keyword |
| 114 |
|
| 115 |
[ |
| 116 |
"interface" |
| 117 |
"enum" |
| 118 |
"type" |
| 119 |
"union" |
| 120 |
"struct" |
| 121 |
"module" |
| 122 |
] @keyword.storage.type |
| 123 |
|
| 124 |
[ |
| 125 |
"static" |
| 126 |
"const" |
| 127 |
"__global" |
| 128 |
] @keyword.storage.modifier |
| 129 |
|
| 130 |
[ |
| 131 |
"mut" |
| 132 |
] @keyword.storage.modifier.mut |
| 133 |
|
| 134 |
[ |
| 135 |
"shared" |
| 136 |
"lock" |
| 137 |
"rlock" |
| 138 |
"spawn" |
| 139 |
"break" |
| 140 |
"continue" |
| 141 |
"go" |
| 142 |
] @keyword.control |
| 143 |
|
| 144 |
[ |
| 145 |
"if" |
| 146 |
"$if" |
| 147 |
"select" |
| 148 |
"else" |
| 149 |
"$else" |
| 150 |
"match" |
| 151 |
] @keyword.control.conditional |
| 152 |
|
| 153 |
[ |
| 154 |
"for" |
| 155 |
] @keyword.control.repeat |
| 156 |
|
| 157 |
[ |
| 158 |
"goto" |
| 159 |
"return" |
| 160 |
] @keyword.control.return |
| 161 |
|
| 162 |
[ |
| 163 |
"fn" |
| 164 |
] @keyword.function |
| 165 |
|
| 166 |
|
| 167 |
[ |
| 168 |
"import" |
| 169 |
] @keyword.control.import |
| 170 |
|
| 171 |
[ |
| 172 |
"as" |
| 173 |
"in" |
| 174 |
"is" |
| 175 |
"or" |
| 176 |
] @keyword.operator |
| 177 |
|
| 178 |
[ |
| 179 |
"." |
| 180 |
"," |
| 181 |
":" |
| 182 |
";" |
| 183 |
] @punctuation.delimiter |
| 184 |
|
| 185 |
[ |
| 186 |
"(" |
| 187 |
")" |
| 188 |
"{" |
| 189 |
"}" |
| 190 |
"[" |
| 191 |
"]" |
| 192 |
] @punctuation.bracket |
| 193 |
|
| 194 |
(array_creation) @punctuation.bracket |
| 195 |
|
| 196 |
[ |
| 197 |
"++" |
| 198 |
"--" |
| 199 |
|
| 200 |
"+" |
| 201 |
"-" |
| 202 |
"*" |
| 203 |
"/" |
| 204 |
"%" |
| 205 |
|
| 206 |
"~" |
| 207 |
"&" |
| 208 |
"|" |
| 209 |
"^" |
| 210 |
|
| 211 |
"!" |
| 212 |
"&&" |
| 213 |
"||" |
| 214 |
"!=" |
| 215 |
|
| 216 |
"<<" |
| 217 |
">>" |
| 218 |
|
| 219 |
"<" |
| 220 |
">" |
| 221 |
"<=" |
| 222 |
">=" |
| 223 |
|
| 224 |
"+=" |
| 225 |
"-=" |
| 226 |
"*=" |
| 227 |
"/=" |
| 228 |
"&=" |
| 229 |
"|=" |
| 230 |
"^=" |
| 231 |
"<<=" |
| 232 |
">>=" |
| 233 |
|
| 234 |
"=" |
| 235 |
":=" |
| 236 |
"==" |
| 237 |
|
| 238 |
"?" |
| 239 |
"<-" |
| 240 |
"$" |
| 241 |
".." |
| 242 |
"..." |
| 243 |
] @operator |