| 1 |
(identifier) @variable |
| 2 |
|
| 3 |
|
| 4 |
((identifier) @constant |
| 5 |
(#match? @constant "^[A-Z][A-Z\\d_]+$'")) |
| 6 |
|
| 7 |
|
| 8 |
(function_definition |
| 9 |
name: (identifier) @function) |
| 10 |
(function_declaration |
| 11 |
name: (identifier) @function) |
| 12 |
(parameter_declaration |
| 13 |
name: (identifier) @variable.parameter) |
| 14 |
|
| 15 |
|
| 16 |
(field_access |
| 17 |
field: (identifier) @variable.other.member) |
| 18 |
|
| 19 |
|
| 20 |
(call_expression |
| 21 |
function: (identifier) @function) |
| 22 |
(call_expression |
| 23 |
function: (field_access |
| 24 |
field: (identifier) @function)) |
| 25 |
|
| 26 |
|
| 27 |
(builtin_type) @type.builtin |
| 28 |
(type (identifier) @type) |
| 29 |
(any_type) @type |
| 30 |
|
| 31 |
|
| 32 |
(variable_storage_class) @keyword.storage |
| 33 |
(variable_declaration |
| 34 |
name: (identifier) @variable) |
| 35 |
(old_variable_declaration |
| 36 |
name: (identifier) @variable) |
| 37 |
|
| 38 |
|
| 39 |
(preproc_include) @keyword.control.import |
| 40 |
(preproc_tryinclude) @keyword.control.import |
| 41 |
(system_lib_string) @string |
| 42 |
(string_literal) @string |
| 43 |
|
| 44 |
(preproc_assert) @keyword.directive |
| 45 |
(preproc_pragma) @keyword.directive |
| 46 |
(preproc_arg) @constant |
| 47 |
(preproc_macro) @function.macro |
| 48 |
(macro_param) @variable.parameter |
| 49 |
(preproc_if) @keyword.directive |
| 50 |
(preproc_else) @keyword.directive |
| 51 |
(preproc_elseif) @keyword.directive |
| 52 |
(preproc_endif) @keyword.directive |
| 53 |
(preproc_endinput) @keyword.directive |
| 54 |
(preproc_define) @keyword.directive |
| 55 |
(preproc_define |
| 56 |
name: (identifier) @constant) |
| 57 |
(preproc_undefine) @keyword.directive |
| 58 |
(preproc_undefine |
| 59 |
name: (identifier) @constant) |
| 60 |
(preproc_error) @function.macro |
| 61 |
(preproc_warning) @function.macro |
| 62 |
|
| 63 |
|
| 64 |
(for_statement) @keyword.control.repeat |
| 65 |
(condition_statement) @keyword.control.conditional |
| 66 |
(while_statement) @keyword.control.repeat |
| 67 |
(do_while_statement) @keyword.control.repeat |
| 68 |
(switch_statement) @keyword.control.conditional |
| 69 |
(switch_case) @keyword.control.conditional |
| 70 |
(ternary_expression ["?" ":"] @operator) |
| 71 |
|
| 72 |
|
| 73 |
(view_as) @function.builtin |
| 74 |
(sizeof_expression) @function.macro |
| 75 |
(this) @variable.builtin |
| 76 |
|
| 77 |
|
| 78 |
(hardcoded_symbol) @variable.builtin |
| 79 |
|
| 80 |
|
| 81 |
(comment) @comment |
| 82 |
|
| 83 |
|
| 84 |
(parameter_declaration |
| 85 |
defaultValue: (identifier) @constant) |
| 86 |
(fixed_dimension) @punctuation.bracket |
| 87 |
(dimension) @punctuation.bracket |
| 88 |
(array_indexed_access) @punctuation.bracket |
| 89 |
(escape_sequence) @constant.character.escape |
| 90 |
|
| 91 |
|
| 92 |
(new_expression |
| 93 |
class: (identifier) @type |
| 94 |
arguments: (call_arguments) @constructor) |
| 95 |
|
| 96 |
|
| 97 |
(methodmap) @type.definition |
| 98 |
(methodmap |
| 99 |
name: (identifier) @type) |
| 100 |
(methodmap |
| 101 |
inherits: (identifier) @type) |
| 102 |
(methodmap_method_constructor |
| 103 |
name: (identifier) @constructor) |
| 104 |
(methodmap_method |
| 105 |
name: (identifier) @function.method) |
| 106 |
(methodmap_native |
| 107 |
name: (identifier) @function.method) |
| 108 |
(methodmap_property |
| 109 |
name: (identifier) @variable.other.member) |
| 110 |
(methodmap_property_getter) @function.method |
| 111 |
(methodmap_property_setter) @function.method |
| 112 |
|
| 113 |
|
| 114 |
(enum_struct) @type.enum.variant |
| 115 |
(enum_struct |
| 116 |
name: (identifier) @type) |
| 117 |
(enum_struct_field |
| 118 |
name: (identifier) @variable.other.member) |
| 119 |
(enum_struct_method |
| 120 |
name: (identifier) @function.method) |
| 121 |
|
| 122 |
|
| 123 |
(variable_storage_class) @keyword.storage |
| 124 |
(visibility) @keyword.storage |
| 125 |
(visibility) @keyword.storage |
| 126 |
(assertion) @function.builtin |
| 127 |
(function_declaration_kind) @keyword.function |
| 128 |
[ |
| 129 |
"new" |
| 130 |
"delete" |
| 131 |
] @keyword.operator |
| 132 |
[ |
| 133 |
"." |
| 134 |
"," |
| 135 |
] @punctuation.delimiter |
| 136 |
|
| 137 |
|
| 138 |
[ |
| 139 |
"+" |
| 140 |
"-" |
| 141 |
"..." |
| 142 |
"*" |
| 143 |
"/" |
| 144 |
"%" |
| 145 |
"++" |
| 146 |
"--" |
| 147 |
"=" |
| 148 |
"+=" |
| 149 |
"-=" |
| 150 |
"*=" |
| 151 |
"/=" |
| 152 |
"==" |
| 153 |
"!=" |
| 154 |
"<" |
| 155 |
">" |
| 156 |
">=" |
| 157 |
"<=" |
| 158 |
"!" |
| 159 |
"&&" |
| 160 |
"||" |
| 161 |
"&" |
| 162 |
"|" |
| 163 |
"~" |
| 164 |
"^" |
| 165 |
"<<" |
| 166 |
">>" |
| 167 |
">>>" |
| 168 |
"|=" |
| 169 |
"&=" |
| 170 |
"^=" |
| 171 |
"~=" |
| 172 |
"<<=" |
| 173 |
">>=" |
| 174 |
] @operator |
| 175 |
(ignore_argument) @operator |
| 176 |
(scope_access) @operator |
| 177 |
(rest_operator) @operator |
| 178 |
|
| 179 |
|
| 180 |
(struct_declaration |
| 181 |
name: (identifier) @variable.builtin) |
| 182 |
|
| 183 |
|
| 184 |
(typeset) @type.builtin |
| 185 |
(typedef) @type.builtin |
| 186 |
(functag) @type.builtin |
| 187 |
(funcenum) @type.builtin |
| 188 |
(typedef_expression) @keyword.function |
| 189 |
|
| 190 |
|
| 191 |
(enum) @type.enum |
| 192 |
(enum |
| 193 |
name: (identifier) @type) |
| 194 |
(enum_entry |
| 195 |
name: (identifier) @constant) |
| 196 |
(enum_entry |
| 197 |
value: (_) @constant) |
| 198 |
|
| 199 |
|
| 200 |
(int_literal) @constant.numeric.integer |
| 201 |
(char_literal) @constant.character |
| 202 |
(float_literal) @constant.numeric.float |
| 203 |
(string_literal) @string |
| 204 |
(array_literal) @punctuation.bracket |
| 205 |
(null) @constant.builtin |
| 206 |
(bool_literal) @constant.builtin.boolean |
| 207 |
((identifier) @constant |
| 208 |
(#match? @constant "INVALID_HANDLE")) |
| 209 |
|
| 210 |
|
| 211 |
|
| 212 |
|
| 213 |
((comment) @diff.plus |
| 214 |
(#match? @diff.plus "^\/[\/\*][\t ]TODO")) |
| 215 |
((comment) @diff.plus |
| 216 |
(#match? @diff.plus "^\/[\/\*][\t ]NOTE")) |
| 217 |
((comment) @diff.minus |
| 218 |
(#match? @diff.minus "^\/[\/\*][\t ]WARNING")) |
| 219 |
|
| 220 |
|
| 221 |
[ |
| 222 |
"__nullable__" |
| 223 |
"break" |
| 224 |
"case" |
| 225 |
"const" |
| 226 |
"continue" |
| 227 |
"default" |
| 228 |
"delete" |
| 229 |
"do" |
| 230 |
"else" |
| 231 |
"enum" |
| 232 |
"for" |
| 233 |
"forward" |
| 234 |
"funcenum" |
| 235 |
"functag" |
| 236 |
"get" |
| 237 |
"if" |
| 238 |
"methodmap" |
| 239 |
"native" |
| 240 |
"new" |
| 241 |
"property" |
| 242 |
"public" |
| 243 |
"return" |
| 244 |
"set" |
| 245 |
"static" |
| 246 |
"stock" |
| 247 |
"struct" |
| 248 |
"switch" |
| 249 |
"typedef" |
| 250 |
"typeset" |
| 251 |
"void" |
| 252 |
"while" |
| 253 |
] @keyword |
| 254 |
|