| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
(line_comment) @comment.line |
| 29 |
(block_comment) @comment.block |
| 30 |
|
| 31 |
|
| 32 |
(identifier) @variable |
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
(import_item (identifier) @type |
| 37 |
(#match? @type "^[A-Z]")) |
| 38 |
|
| 39 |
(import_item (identifier) @constant |
| 40 |
(#match? @constant "^[A-Z0-9_]+$")) |
| 41 |
|
| 42 |
(import_item (identifier) @namespace) |
| 43 |
|
| 44 |
(import_path (identifier) @namespace) |
| 45 |
|
| 46 |
(ident_path (identifier) @namespace) |
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
((identifier) @constant |
| 51 |
(#match? @constant "^[A-Z0-9_]+$")) |
| 52 |
|
| 53 |
((identifier) @type |
| 54 |
(#match? @type "^[A-Z]")) |
| 55 |
|
| 56 |
(type_specifier |
| 57 |
(identifier) @type) |
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
(function_decl |
| 62 |
(function_header |
| 63 |
(identifier) @function)) |
| 64 |
|
| 65 |
(call_expression |
| 66 |
(identifier) @function) |
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
(template_list) @punctuation |
| 71 |
|
| 72 |
(variable_decl |
| 73 |
(template_list |
| 74 |
(identifier) @keyword.storage.modifier)) |
| 75 |
|
| 76 |
(type_specifier |
| 77 |
(template_list |
| 78 |
(identifier) @type)) |
| 79 |
|
| 80 |
(template_list |
| 81 |
(template_list |
| 82 |
(identifier) @type)) |
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
(attribute |
| 87 |
(identifier) @attribute) @attribute |
| 88 |
|
| 89 |
(attribute |
| 90 |
(identifier) @attr-name |
| 91 |
(argument_list |
| 92 |
(identifier) @variable.builtin) |
| 93 |
(#eq? @attr-name "builtin")) |
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
(param |
| 98 |
(identifier) @variable.parameter) |
| 99 |
(variable_decl |
| 100 |
(identifier) @variable) |
| 101 |
(const_assert_statement) @variable |
| 102 |
|
| 103 |
(struct_decl |
| 104 |
(identifier) @type) |
| 105 |
|
| 106 |
(struct_member |
| 107 |
name: (_) @variable.other.member) |
| 108 |
|
| 109 |
(named_component_expression |
| 110 |
component: (_) @variable.other.member) |
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
(bool_literal) @constant.builtin.boolean |
| 115 |
(int_literal) @constant.numeric.integer |
| 116 |
(float_literal) @constant.numeric.float |
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
[ |
| 122 |
"if" |
| 123 |
"else" |
| 124 |
] @keyword.control.conditional |
| 125 |
[ |
| 126 |
"loop" |
| 127 |
"for" |
| 128 |
"while" |
| 129 |
"break" |
| 130 |
"continue" |
| 131 |
] @keyword.control.repeat |
| 132 |
[ |
| 133 |
"return" |
| 134 |
] @keyword.control.return |
| 135 |
[ |
| 136 |
"switch" |
| 137 |
"case" |
| 138 |
"default" |
| 139 |
"discard" |
| 140 |
] @keyword.control |
| 141 |
[ |
| 142 |
"import" |
| 143 |
"as" |
| 144 |
] @keyword.control.import |
| 145 |
[ |
| 146 |
"fn" |
| 147 |
] @keyword.function |
| 148 |
[ |
| 149 |
"var" |
| 150 |
"let" |
| 151 |
"const" |
| 152 |
"struct" |
| 153 |
] @keyword.storage.type |
| 154 |
[ |
| 155 |
"alias" |
| 156 |
"virtual" |
| 157 |
"override" |
| 158 |
] @keyword |
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
[ |
| 163 |
"-" "!" "~" "*" "&" |
| 164 |
"^" "|" "/" "%" "+" (shift_left) (shift_right) |
| 165 |
(less_than) (greater_than) (less_than_equal) (greater_than_equal) "==" "!=" |
| 166 |
"+=" "-=" "*=" "/=" "%=" "|=" "^=" "++" "--" "=" |
| 167 |
"->" |
| 168 |
] @operator |
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
[ "(" ")" "[" "]" "{" "}" ] @punctuation.bracket |
| 173 |
[ "," "." ":" ";" ] @punctuation.delimiter |
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
[ (preproc_directive) "#import" ] @keyword.directive |