| 1 |
|
| 2 |
(component_declaration "component" @keyword) |
| 3 |
(fragment_declaration "fragment" @keyword) |
| 4 |
(server_block "#server" @keyword) |
| 5 |
|
| 6 |
|
| 7 |
[ |
| 8 |
"track" |
| 9 |
"untrack" |
| 10 |
] @function.builtin |
| 11 |
|
| 12 |
|
| 13 |
am |
| 14 |
|
| 15 |
|
| 16 |
(identifier) @variable |
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
(member_expression |
| 22 |
property: (identifier) @variable.other.member) |
| 23 |
|
| 24 |
|
| 25 |
(component_declaration |
| 26 |
name: (identifier) @function) |
| 27 |
|
| 28 |
(fragment_declaration |
| 29 |
name: (identifier) @function) |
| 30 |
|
| 31 |
(function_declaration |
| 32 |
name: (identifier) @function) |
| 33 |
|
| 34 |
(method_definition |
| 35 |
name: (property_name) @function.method) |
| 36 |
|
| 37 |
(call_expression |
| 38 |
function: (identifier) @function) |
| 39 |
|
| 40 |
(call_expression |
| 41 |
function: (member_expression |
| 42 |
property: (identifier) @function.method)) |
| 43 |
|
| 44 |
|
| 45 |
(required_parameter |
| 46 |
pattern: (identifier) @variable.parameter) |
| 47 |
|
| 48 |
(rest_parameter |
| 49 |
(identifier) @variable.parameter) |
| 50 |
|
| 51 |
|
| 52 |
(unbox_expression "@" @operator.special) |
| 53 |
(reactive_array "#[" @punctuation.bracket.special) |
| 54 |
(reactive_object "#{" @punctuation.bracket.special) |
| 55 |
|
| 56 |
|
| 57 |
(jsx_opening_element |
| 58 |
"<" @tag.delimiter |
| 59 |
name: (jsx_element_name) @tag |
| 60 |
">" @tag.delimiter) |
| 61 |
|
| 62 |
(jsx_closing_element |
| 63 |
"</" @tag.delimiter |
| 64 |
name: (jsx_element_name) @tag |
| 65 |
">" @tag.delimiter) |
| 66 |
|
| 67 |
(jsx_self_closing_element |
| 68 |
"<" @tag.delimiter |
| 69 |
name: (jsx_non_namespaced_element_name) @tag |
| 70 |
"/>" @tag.delimiter) |
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
(jsx_opening_element |
| 77 |
name: (jsx_element_name (identifier) @tag)) |
| 78 |
|
| 79 |
(jsx_closing_element |
| 80 |
name: (jsx_element_name (identifier) @tag)) |
| 81 |
|
| 82 |
(jsx_self_closing_element |
| 83 |
name: (jsx_non_namespaced_element_name (identifier) @tag)) |
| 84 |
|
| 85 |
|
| 86 |
(jsx_opening_element |
| 87 |
name: (jsx_element_name |
| 88 |
(unbox_expression (identifier) @tag))) |
| 89 |
|
| 90 |
(jsx_closing_element |
| 91 |
name: (jsx_element_name |
| 92 |
(unbox_expression (identifier) @tag))) |
| 93 |
|
| 94 |
(jsx_self_closing_element |
| 95 |
name: (jsx_non_namespaced_element_name |
| 96 |
(unbox_expression (identifier) @tag))) |
| 97 |
|
| 98 |
(jsx_attribute |
| 99 |
name: [(identifier) (jsx_namespace_name)] @attribute) |
| 100 |
|
| 101 |
(jsx_expression |
| 102 |
"{" @punctuation.bracket |
| 103 |
"}" @punctuation.bracket) |
| 104 |
|
| 105 |
|
| 106 |
(style_element |
| 107 |
"<style" @tag |
| 108 |
">" @tag.delimiter |
| 109 |
"</style>" @tag) |
| 110 |
|
| 111 |
(style_element |
| 112 |
(raw_text) @string.special) |
| 113 |
|
| 114 |
|
| 115 |
(type_identifier) @type |
| 116 |
(predefined_type) @type.builtin |
| 117 |
(type_parameter (identifier) @type.parameter) |
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
(string) @string |
| 124 |
(template_string) @string |
| 125 |
(template_substitution |
| 126 |
"${" @punctuation.special |
| 127 |
"}" @punctuation.special) |
| 128 |
|
| 129 |
(number) @constant.numeric |
| 130 |
(true) @constant.builtin.boolean |
| 131 |
(false) @constant.builtin.boolean |
| 132 |
(null) @constant.builtin |
| 133 |
(undefined) @constant.builtin |
| 134 |
|
| 135 |
|
| 136 |
(regex) @string.regexp |
| 137 |
(regex_pattern) @string.regexp |
| 138 |
(regex_flags) @string.regexp |
| 139 |
|
| 140 |
|
| 141 |
(comment) @comment |
| 142 |
|
| 143 |
|
| 144 |
(unary_expression operator: _ @operator) |
| 145 |
(binary_expression operator: _ @operator) |
| 146 |
(ternary_expression ":" @operator) |
| 147 |
(update_expression operator: _ @operator) |
| 148 |
|
| 149 |
[ |
| 150 |
"=" |
| 151 |
"+=" |
| 152 |
"-=" |
| 153 |
"*=" |
| 154 |
"/=" |
| 155 |
"%=" |
| 156 |
"^=" |
| 157 |
"&=" |
| 158 |
"|=" |
| 159 |
">>=" |
| 160 |
">>>=" |
| 161 |
"<<=" |
| 162 |
"**=" |
| 163 |
"&&=" |
| 164 |
"||=" |
| 165 |
"??=" |
| 166 |
] @operator |
| 167 |
|
| 168 |
[ |
| 169 |
"+" |
| 170 |
"-" |
| 171 |
"*" |
| 172 |
"/" |
| 173 |
"%" |
| 174 |
"**" |
| 175 |
"++" |
| 176 |
"--" |
| 177 |
] @operator |
| 178 |
|
| 179 |
[ |
| 180 |
"&&" |
| 181 |
"||" |
| 182 |
"??" |
| 183 |
"!" |
| 184 |
"~" |
| 185 |
] @operator |
| 186 |
|
| 187 |
[ |
| 188 |
"==" |
| 189 |
"===" |
| 190 |
"!=" |
| 191 |
"!==" |
| 192 |
"<" |
| 193 |
"<=" |
| 194 |
">" |
| 195 |
">=" |
| 196 |
] @operator |
| 197 |
|
| 198 |
[ |
| 199 |
"<<" |
| 200 |
">>" |
| 201 |
">>>" |
| 202 |
"&" |
| 203 |
"|" |
| 204 |
"^" |
| 205 |
] @operator |
| 206 |
|
| 207 |
|
| 208 |
[ |
| 209 |
"if" |
| 210 |
"else" |
| 211 |
"switch" |
| 212 |
"case" |
| 213 |
"default" |
| 214 |
"for" |
| 215 |
"while" |
| 216 |
"do" |
| 217 |
"break" |
| 218 |
"continue" |
| 219 |
"return" |
| 220 |
"throw" |
| 221 |
"try" |
| 222 |
"catch" |
| 223 |
"finally" |
| 224 |
] @keyword.control |
| 225 |
|
| 226 |
[ |
| 227 |
"await" |
| 228 |
"async" |
| 229 |
] @keyword.control |
| 230 |
|
| 231 |
[ |
| 232 |
"import" |
| 233 |
"export" |
| 234 |
"from" |
| 235 |
"as" |
| 236 |
] @keyword.control.import |
| 237 |
|
| 238 |
|
| 239 |
[ |
| 240 |
"function" |
| 241 |
"class" |
| 242 |
"extends" |
| 243 |
"implements" |
| 244 |
"new" |
| 245 |
"typeof" |
| 246 |
"instanceof" |
| 247 |
"in" |
| 248 |
"of" |
| 249 |
"void" |
| 250 |
"delete" |
| 251 |
"yield" |
| 252 |
"static" |
| 253 |
"get" |
| 254 |
"set" |
| 255 |
"abstract" |
| 256 |
"readonly" |
| 257 |
"declare" |
| 258 |
"override" |
| 259 |
] @keyword |
| 260 |
|
| 261 |
[ |
| 262 |
"let" |
| 263 |
"const" |
| 264 |
"var" |
| 265 |
] @keyword.storage |
| 266 |
|
| 267 |
|
| 268 |
[ |
| 269 |
(this) |
| 270 |
(super) |
| 271 |
] @variable.builtin |
| 272 |
|
| 273 |
|
| 274 |
((identifier) @variable.builtin |
| 275 |
(#any-of? @variable.builtin "arguments" "await" "component" "fragment" "track" "untrack")) |
| 276 |
|
| 277 |
|
| 278 |
(property_signature |
| 279 |
name: (property_name) @variable.other.member) |
| 280 |
|
| 281 |
(pair |
| 282 |
key: (property_name) @variable.other.member) |
| 283 |
|
| 284 |
(shorthand_property_identifier) @variable.other.member |
| 285 |
(shorthand_property_identifier_pattern) @variable.other.member |
| 286 |
|
| 287 |
|
| 288 |
(private_property_identifier) @variable.other.member |
| 289 |
|
| 290 |
|
| 291 |
["(" ")" "[" "]" "{" "}"] @punctuation.bracket |
| 292 |
["." "," ";" ":" "..."] @punctuation.delimiter |
| 293 |
|
| 294 |
|
| 295 |
|
| 296 |
"=>" @operator |
| 297 |
|
| 298 |
|
| 299 |
(hash_bang_line) @comment |