PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.1.0
Code Block Pro – Beautiful Syntax Highlighting v1.1.0
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / languages / javascript.tmLanguage.json

javascript.tmLanguage.json in Code Block Pro – Beautiful Syntax Highlighting 1.1.0, at build/shiki/languages/javascript.tmLanguage.json

5,913 lines 239.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "information_for_contributors": [
3 "This file has been converted from https://github.com/microsoft/TypeScript-TmLanguage/blob/master/TypeScriptReact.tmLanguage",
4 "If you want to provide a fix or improvement, please create a pull request against the original repository.",
5 "Once accepted there, we are happy to receive an update request."
6 ],
7 "version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/0dfae8cc4807fecfbf8f1add095d9817df824c95",
8 "name": "javascript",
9 "scopeName": "source.js",
10 "patterns": [
11 {
12 "include": "#directives"
13 },
14 {
15 "include": "#statements"
16 },
17 {
18 "include": "#shebang"
19 }
20 ],
21 "repository": {
22 "shebang": {
23 "name": "comment.line.shebang.js",
24 "match": "\\A(#!).*(?=$)",
25 "captures": {
26 "1": {
27 "name": "punctuation.definition.comment.js"
28 }
29 }
30 },
31 "statements": {
32 "patterns": [
33 {
34 "include": "#declaration"
35 },
36 {
37 "include": "#control-statement"
38 },
39 {
40 "include": "#after-operator-block-as-object-literal"
41 },
42 {
43 "include": "#decl-block"
44 },
45 {
46 "include": "#label"
47 },
48 {
49 "include": "#expression"
50 },
51 {
52 "include": "#punctuation-semicolon"
53 },
54 {
55 "include": "#string"
56 },
57 {
58 "include": "#comment"
59 }
60 ]
61 },
62 "declaration": {
63 "patterns": [
64 {
65 "include": "#decorator"
66 },
67 {
68 "include": "#var-expr"
69 },
70 {
71 "include": "#function-declaration"
72 },
73 {
74 "include": "#class-declaration"
75 },
76 {
77 "include": "#interface-declaration"
78 },
79 {
80 "include": "#enum-declaration"
81 },
82 {
83 "include": "#namespace-declaration"
84 },
85 {
86 "include": "#type-alias-declaration"
87 },
88 {
89 "include": "#import-equals-declaration"
90 },
91 {
92 "include": "#import-declaration"
93 },
94 {
95 "include": "#export-declaration"
96 },
97 {
98 "name": "storage.modifier.js",
99 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(declare|export)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
100 }
101 ]
102 },
103 "control-statement": {
104 "patterns": [
105 {
106 "include": "#switch-statement"
107 },
108 {
109 "include": "#for-loop"
110 },
111 {
112 "name": "keyword.control.trycatch.js",
113 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(catch|finally|throw|try)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
114 },
115 {
116 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(break|continue|goto)\\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
117 "captures": {
118 "1": {
119 "name": "keyword.control.loop.js"
120 },
121 "2": {
122 "name": "entity.name.label.js"
123 }
124 }
125 },
126 {
127 "name": "keyword.control.loop.js",
128 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(break|continue|do|goto|while)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
129 },
130 {
131 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(return)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
132 "beginCaptures": {
133 "0": {
134 "name": "keyword.control.flow.js"
135 }
136 },
137 "end": "(?=[;}]|$|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
138 "patterns": [
139 {
140 "include": "#expression"
141 }
142 ]
143 },
144 {
145 "name": "keyword.control.switch.js",
146 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default|switch)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
147 },
148 {
149 "include": "#if-statement"
150 },
151 {
152 "name": "keyword.control.conditional.js",
153 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(else|if)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
154 },
155 {
156 "name": "keyword.control.with.js",
157 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(with)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
158 },
159 {
160 "name": "keyword.control.js",
161 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(package)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
162 },
163 {
164 "name": "keyword.other.debugger.js",
165 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(debugger)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
166 }
167 ]
168 },
169 "label": {
170 "patterns": [
171 {
172 "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)(?=\\s*\\{)",
173 "beginCaptures": {
174 "1": {
175 "name": "entity.name.label.js"
176 },
177 "2": {
178 "name": "punctuation.separator.label.js"
179 }
180 },
181 "end": "(?<=\\})",
182 "patterns": [
183 {
184 "include": "#decl-block"
185 }
186 ]
187 },
188 {
189 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)",
190 "captures": {
191 "1": {
192 "name": "entity.name.label.js"
193 },
194 "2": {
195 "name": "punctuation.separator.label.js"
196 }
197 }
198 }
199 ]
200 },
201 "expression": {
202 "patterns": [
203 {
204 "include": "#expressionWithoutIdentifiers"
205 },
206 {
207 "include": "#identifiers"
208 },
209 {
210 "include": "#expressionPunctuations"
211 }
212 ]
213 },
214 "expressionWithoutIdentifiers": {
215 "patterns": [
216 {
217 "include": "#jsx"
218 },
219 {
220 "include": "#string"
221 },
222 {
223 "include": "#regex"
224 },
225 {
226 "include": "#comment"
227 },
228 {
229 "include": "#function-expression"
230 },
231 {
232 "include": "#class-expression"
233 },
234 {
235 "include": "#arrow-function"
236 },
237 {
238 "include": "#paren-expression-possibly-arrow"
239 },
240 {
241 "include": "#cast"
242 },
243 {
244 "include": "#ternary-expression"
245 },
246 {
247 "include": "#new-expr"
248 },
249 {
250 "include": "#instanceof-expr"
251 },
252 {
253 "include": "#object-literal"
254 },
255 {
256 "include": "#expression-operators"
257 },
258 {
259 "include": "#function-call"
260 },
261 {
262 "include": "#literal"
263 },
264 {
265 "include": "#support-objects"
266 },
267 {
268 "include": "#paren-expression"
269 }
270 ]
271 },
272 "expressionPunctuations": {
273 "patterns": [
274 {
275 "include": "#punctuation-comma"
276 },
277 {
278 "include": "#punctuation-accessor"
279 }
280 ]
281 },
282 "decorator": {
283 "name": "meta.decorator.js",
284 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))\\@",
285 "beginCaptures": {
286 "0": {
287 "name": "punctuation.decorator.js"
288 }
289 },
290 "end": "(?=\\s)",
291 "patterns": [
292 {
293 "include": "#expression"
294 }
295 ]
296 },
297 "var-expr": {
298 "patterns": [
299 {
300 "name": "meta.var.expr.js",
301 "begin": "(?=(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))",
302 "end": "(?!(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))((?=;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))|((?<!^let|[^\\._$[:alnum:]]let|^var|[^\\._$[:alnum:]]var)(?=\\s*$)))",
303 "patterns": [
304 {
305 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
306 "beginCaptures": {
307 "1": {
308 "name": "keyword.control.export.js"
309 },
310 "2": {
311 "name": "storage.modifier.js"
312 },
313 "3": {
314 "name": "storage.type.js"
315 }
316 },
317 "end": "(?=\\S)"
318 },
319 {
320 "include": "#destructuring-variable"
321 },
322 {
323 "include": "#var-single-variable"
324 },
325 {
326 "include": "#variable-initializer"
327 },
328 {
329 "include": "#comment"
330 },
331 {
332 "begin": "(,)\\s*((?!\\S)|(?=\\/\\/))",
333 "beginCaptures": {
334 "1": {
335 "name": "punctuation.separator.comma.js"
336 }
337 },
338 "end": "(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))",
339 "patterns": [
340 {
341 "include": "#single-line-comment-consuming-line-ending"
342 },
343 {
344 "include": "#comment"
345 },
346 {
347 "include": "#destructuring-variable"
348 },
349 {
350 "include": "#var-single-variable"
351 },
352 {
353 "include": "#punctuation-comma"
354 }
355 ]
356 },
357 {
358 "include": "#punctuation-comma"
359 }
360 ]
361 },
362 {
363 "name": "meta.var.expr.js",
364 "begin": "(?=(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))",
365 "beginCaptures": {
366 "1": {
367 "name": "keyword.control.export.js"
368 },
369 "2": {
370 "name": "storage.modifier.js"
371 },
372 "3": {
373 "name": "storage.type.js"
374 }
375 },
376 "end": "(?!(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))((?=;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))|((?<!^const|[^\\._$[:alnum:]]const)(?=\\s*$)))",
377 "patterns": [
378 {
379 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
380 "beginCaptures": {
381 "1": {
382 "name": "keyword.control.export.js"
383 },
384 "2": {
385 "name": "storage.modifier.js"
386 },
387 "3": {
388 "name": "storage.type.js"
389 }
390 },
391 "end": "(?=\\S)"
392 },
393 {
394 "include": "#destructuring-const"
395 },
396 {
397 "include": "#var-single-const"
398 },
399 {
400 "include": "#variable-initializer"
401 },
402 {
403 "include": "#comment"
404 },
405 {
406 "begin": "(,)\\s*((?!\\S)|(?=\\/\\/))",
407 "beginCaptures": {
408 "1": {
409 "name": "punctuation.separator.comma.js"
410 }
411 },
412 "end": "(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))",
413 "patterns": [
414 {
415 "include": "#single-line-comment-consuming-line-ending"
416 },
417 {
418 "include": "#comment"
419 },
420 {
421 "include": "#destructuring-const"
422 },
423 {
424 "include": "#var-single-const"
425 },
426 {
427 "include": "#punctuation-comma"
428 }
429 ]
430 },
431 {
432 "include": "#punctuation-comma"
433 }
434 ]
435 }
436 ]
437 },
438 "var-single-variable": {
439 "patterns": [
440 {
441 "name": "meta.var-single-variable.expr.js",
442 "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\!)?(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
443 "beginCaptures": {
444 "1": {
445 "name": "meta.definition.variable.js entity.name.function.js"
446 },
447 "2": {
448 "name": "keyword.operator.definiteassignment.js"
449 }
450 },
451 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
452 "patterns": [
453 {
454 "include": "#var-single-variable-type-annotation"
455 }
456 ]
457 },
458 {
459 "name": "meta.var-single-variable.expr.js",
460 "begin": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])(\\!)?",
461 "beginCaptures": {
462 "1": {
463 "name": "meta.definition.variable.js variable.other.constant.js"
464 },
465 "2": {
466 "name": "keyword.operator.definiteassignment.js"
467 }
468 },
469 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
470 "patterns": [
471 {
472 "include": "#var-single-variable-type-annotation"
473 }
474 ]
475 },
476 {
477 "name": "meta.var-single-variable.expr.js",
478 "begin": "([_$[:alpha:]][_$[:alnum:]]*)(\\!)?",
479 "beginCaptures": {
480 "1": {
481 "name": "meta.definition.variable.js variable.other.readwrite.js"
482 },
483 "2": {
484 "name": "keyword.operator.definiteassignment.js"
485 }
486 },
487 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
488 "patterns": [
489 {
490 "include": "#var-single-variable-type-annotation"
491 }
492 ]
493 }
494 ]
495 },
496 "var-single-const": {
497 "patterns": [
498 {
499 "name": "meta.var-single-variable.expr.js",
500 "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
501 "beginCaptures": {
502 "1": {
503 "name": "meta.definition.variable.js variable.other.constant.js entity.name.function.js"
504 }
505 },
506 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
507 "patterns": [
508 {
509 "include": "#var-single-variable-type-annotation"
510 }
511 ]
512 },
513 {
514 "name": "meta.var-single-variable.expr.js",
515 "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
516 "beginCaptures": {
517 "1": {
518 "name": "meta.definition.variable.js variable.other.constant.js"
519 }
520 },
521 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
522 "patterns": [
523 {
524 "include": "#var-single-variable-type-annotation"
525 }
526 ]
527 }
528 ]
529 },
530 "var-single-variable-type-annotation": {
531 "patterns": [
532 {
533 "include": "#type-annotation"
534 },
535 {
536 "include": "#string"
537 },
538 {
539 "include": "#comment"
540 }
541 ]
542 },
543 "destructuring-variable": {
544 "patterns": [
545 {
546 "name": "meta.object-binding-pattern-variable.js",
547 "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\{)",
548 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
549 "patterns": [
550 {
551 "include": "#object-binding-pattern"
552 },
553 {
554 "include": "#type-annotation"
555 },
556 {
557 "include": "#comment"
558 }
559 ]
560 },
561 {
562 "name": "meta.array-binding-pattern-variable.js",
563 "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\[)",
564 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
565 "patterns": [
566 {
567 "include": "#array-binding-pattern"
568 },
569 {
570 "include": "#type-annotation"
571 },
572 {
573 "include": "#comment"
574 }
575 ]
576 }
577 ]
578 },
579 "destructuring-const": {
580 "patterns": [
581 {
582 "name": "meta.object-binding-pattern-variable.js",
583 "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\{)",
584 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
585 "patterns": [
586 {
587 "include": "#object-binding-pattern-const"
588 },
589 {
590 "include": "#type-annotation"
591 },
592 {
593 "include": "#comment"
594 }
595 ]
596 },
597 {
598 "name": "meta.array-binding-pattern-variable.js",
599 "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\[)",
600 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
601 "patterns": [
602 {
603 "include": "#array-binding-pattern-const"
604 },
605 {
606 "include": "#type-annotation"
607 },
608 {
609 "include": "#comment"
610 }
611 ]
612 }
613 ]
614 },
615 "object-binding-element": {
616 "patterns": [
617 {
618 "include": "#comment"
619 },
620 {
621 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
622 "end": "(?=,|\\})",
623 "patterns": [
624 {
625 "include": "#object-binding-element-propertyName"
626 },
627 {
628 "include": "#binding-element"
629 }
630 ]
631 },
632 {
633 "include": "#object-binding-pattern"
634 },
635 {
636 "include": "#destructuring-variable-rest"
637 },
638 {
639 "include": "#variable-initializer"
640 },
641 {
642 "include": "#punctuation-comma"
643 }
644 ]
645 },
646 "object-binding-element-const": {
647 "patterns": [
648 {
649 "include": "#comment"
650 },
651 {
652 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
653 "end": "(?=,|\\})",
654 "patterns": [
655 {
656 "include": "#object-binding-element-propertyName"
657 },
658 {
659 "include": "#binding-element-const"
660 }
661 ]
662 },
663 {
664 "include": "#object-binding-pattern-const"
665 },
666 {
667 "include": "#destructuring-variable-rest-const"
668 },
669 {
670 "include": "#variable-initializer"
671 },
672 {
673 "include": "#punctuation-comma"
674 }
675 ]
676 },
677 "object-binding-element-propertyName": {
678 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
679 "end": "(:)",
680 "endCaptures": {
681 "0": {
682 "name": "punctuation.destructuring.js"
683 }
684 },
685 "patterns": [
686 {
687 "include": "#string"
688 },
689 {
690 "include": "#array-literal"
691 },
692 {
693 "include": "#numeric-literal"
694 },
695 {
696 "name": "variable.object.property.js",
697 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
698 }
699 ]
700 },
701 "binding-element": {
702 "patterns": [
703 {
704 "include": "#comment"
705 },
706 {
707 "include": "#string"
708 },
709 {
710 "include": "#numeric-literal"
711 },
712 {
713 "include": "#regex"
714 },
715 {
716 "include": "#object-binding-pattern"
717 },
718 {
719 "include": "#array-binding-pattern"
720 },
721 {
722 "include": "#destructuring-variable-rest"
723 },
724 {
725 "include": "#variable-initializer"
726 }
727 ]
728 },
729 "binding-element-const": {
730 "patterns": [
731 {
732 "include": "#comment"
733 },
734 {
735 "include": "#string"
736 },
737 {
738 "include": "#numeric-literal"
739 },
740 {
741 "include": "#regex"
742 },
743 {
744 "include": "#object-binding-pattern-const"
745 },
746 {
747 "include": "#array-binding-pattern-const"
748 },
749 {
750 "include": "#destructuring-variable-rest-const"
751 },
752 {
753 "include": "#variable-initializer"
754 }
755 ]
756 },
757 "destructuring-variable-rest": {
758 "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
759 "captures": {
760 "1": {
761 "name": "keyword.operator.rest.js"
762 },
763 "2": {
764 "name": "meta.definition.variable.js variable.other.readwrite.js"
765 }
766 }
767 },
768 "destructuring-variable-rest-const": {
769 "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
770 "captures": {
771 "1": {
772 "name": "keyword.operator.rest.js"
773 },
774 "2": {
775 "name": "meta.definition.variable.js variable.other.constant.js"
776 }
777 }
778 },
779 "object-binding-pattern": {
780 "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
781 "beginCaptures": {
782 "1": {
783 "name": "keyword.operator.rest.js"
784 },
785 "2": {
786 "name": "punctuation.definition.binding-pattern.object.js"
787 }
788 },
789 "end": "\\}",
790 "endCaptures": {
791 "0": {
792 "name": "punctuation.definition.binding-pattern.object.js"
793 }
794 },
795 "patterns": [
796 {
797 "include": "#object-binding-element"
798 }
799 ]
800 },
801 "object-binding-pattern-const": {
802 "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
803 "beginCaptures": {
804 "1": {
805 "name": "keyword.operator.rest.js"
806 },
807 "2": {
808 "name": "punctuation.definition.binding-pattern.object.js"
809 }
810 },
811 "end": "\\}",
812 "endCaptures": {
813 "0": {
814 "name": "punctuation.definition.binding-pattern.object.js"
815 }
816 },
817 "patterns": [
818 {
819 "include": "#object-binding-element-const"
820 }
821 ]
822 },
823 "array-binding-pattern": {
824 "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
825 "beginCaptures": {
826 "1": {
827 "name": "keyword.operator.rest.js"
828 },
829 "2": {
830 "name": "punctuation.definition.binding-pattern.array.js"
831 }
832 },
833 "end": "\\]",
834 "endCaptures": {
835 "0": {
836 "name": "punctuation.definition.binding-pattern.array.js"
837 }
838 },
839 "patterns": [
840 {
841 "include": "#binding-element"
842 },
843 {
844 "include": "#punctuation-comma"
845 }
846 ]
847 },
848 "array-binding-pattern-const": {
849 "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
850 "beginCaptures": {
851 "1": {
852 "name": "keyword.operator.rest.js"
853 },
854 "2": {
855 "name": "punctuation.definition.binding-pattern.array.js"
856 }
857 },
858 "end": "\\]",
859 "endCaptures": {
860 "0": {
861 "name": "punctuation.definition.binding-pattern.array.js"
862 }
863 },
864 "patterns": [
865 {
866 "include": "#binding-element-const"
867 },
868 {
869 "include": "#punctuation-comma"
870 }
871 ]
872 },
873 "parameter-name": {
874 "patterns": [
875 {
876 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)",
877 "captures": {
878 "1": {
879 "name": "storage.modifier.js"
880 }
881 }
882 },
883 {
884 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
885 "captures": {
886 "1": {
887 "name": "storage.modifier.js"
888 },
889 "2": {
890 "name": "keyword.operator.rest.js"
891 },
892 "3": {
893 "name": "entity.name.function.js variable.language.this.js"
894 },
895 "4": {
896 "name": "entity.name.function.js"
897 },
898 "5": {
899 "name": "keyword.operator.optional.js"
900 }
901 }
902 },
903 {
904 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)",
905 "captures": {
906 "1": {
907 "name": "storage.modifier.js"
908 },
909 "2": {
910 "name": "keyword.operator.rest.js"
911 },
912 "3": {
913 "name": "variable.parameter.js variable.language.this.js"
914 },
915 "4": {
916 "name": "variable.parameter.js"
917 },
918 "5": {
919 "name": "keyword.operator.optional.js"
920 }
921 }
922 }
923 ]
924 },
925 "destructuring-parameter": {
926 "patterns": [
927 {
928 "name": "meta.parameter.object-binding-pattern.js",
929 "begin": "(?<!=|:)\\s*(?:(\\.\\.\\.)\\s*)?(\\{)",
930 "beginCaptures": {
931 "1": {
932 "name": "keyword.operator.rest.js"
933 },
934 "2": {
935 "name": "punctuation.definition.binding-pattern.object.js"
936 }
937 },
938 "end": "\\}",
939 "endCaptures": {
940 "0": {
941 "name": "punctuation.definition.binding-pattern.object.js"
942 }
943 },
944 "patterns": [
945 {
946 "include": "#parameter-object-binding-element"
947 }
948 ]
949 },
950 {
951 "name": "meta.paramter.array-binding-pattern.js",
952 "begin": "(?<!=|:)\\s*(?:(\\.\\.\\.)\\s*)?(\\[)",
953 "beginCaptures": {
954 "1": {
955 "name": "keyword.operator.rest.js"
956 },
957 "2": {
958 "name": "punctuation.definition.binding-pattern.array.js"
959 }
960 },
961 "end": "\\]",
962 "endCaptures": {
963 "0": {
964 "name": "punctuation.definition.binding-pattern.array.js"
965 }
966 },
967 "patterns": [
968 {
969 "include": "#parameter-binding-element"
970 },
971 {
972 "include": "#punctuation-comma"
973 }
974 ]
975 }
976 ]
977 },
978 "parameter-object-binding-element": {
979 "patterns": [
980 {
981 "include": "#comment"
982 },
983 {
984 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
985 "end": "(?=,|\\})",
986 "patterns": [
987 {
988 "include": "#object-binding-element-propertyName"
989 },
990 {
991 "include": "#parameter-binding-element"
992 }
993 ]
994 },
995 {
996 "include": "#parameter-object-binding-pattern"
997 },
998 {
999 "include": "#destructuring-parameter-rest"
1000 },
1001 {
1002 "include": "#variable-initializer"
1003 },
1004 {
1005 "include": "#punctuation-comma"
1006 }
1007 ]
1008 },
1009 "parameter-binding-element": {
1010 "patterns": [
1011 {
1012 "include": "#comment"
1013 },
1014 {
1015 "include": "#string"
1016 },
1017 {
1018 "include": "#numeric-literal"
1019 },
1020 {
1021 "include": "#regex"
1022 },
1023 {
1024 "include": "#parameter-object-binding-pattern"
1025 },
1026 {
1027 "include": "#parameter-array-binding-pattern"
1028 },
1029 {
1030 "include": "#destructuring-parameter-rest"
1031 },
1032 {
1033 "include": "#variable-initializer"
1034 }
1035 ]
1036 },
1037 "destructuring-parameter-rest": {
1038 "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
1039 "captures": {
1040 "1": {
1041 "name": "keyword.operator.rest.js"
1042 },
1043 "2": {
1044 "name": "variable.parameter.js"
1045 }
1046 }
1047 },
1048 "parameter-object-binding-pattern": {
1049 "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
1050 "beginCaptures": {
1051 "1": {
1052 "name": "keyword.operator.rest.js"
1053 },
1054 "2": {
1055 "name": "punctuation.definition.binding-pattern.object.js"
1056 }
1057 },
1058 "end": "\\}",
1059 "endCaptures": {
1060 "0": {
1061 "name": "punctuation.definition.binding-pattern.object.js"
1062 }
1063 },
1064 "patterns": [
1065 {
1066 "include": "#parameter-object-binding-element"
1067 }
1068 ]
1069 },
1070 "parameter-array-binding-pattern": {
1071 "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
1072 "beginCaptures": {
1073 "1": {
1074 "name": "keyword.operator.rest.js"
1075 },
1076 "2": {
1077 "name": "punctuation.definition.binding-pattern.array.js"
1078 }
1079 },
1080 "end": "\\]",
1081 "endCaptures": {
1082 "0": {
1083 "name": "punctuation.definition.binding-pattern.array.js"
1084 }
1085 },
1086 "patterns": [
1087 {
1088 "include": "#parameter-binding-element"
1089 },
1090 {
1091 "include": "#punctuation-comma"
1092 }
1093 ]
1094 },
1095 "field-declaration": {
1096 "name": "meta.field.declaration.js",
1097 "begin": "(?x)(?<!\\()(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s+)?(?=\\s*((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|(\\#?[_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(?:(?:(\\?)|(\\!))\\s*)?(=|:|;|,|\\}|$))",
1098 "beginCaptures": {
1099 "1": {
1100 "name": "storage.modifier.js"
1101 }
1102 },
1103 "end": "(?x)(?=\\}|;|,|$|(^(?!\\s*((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|(\\#?[_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(?:(?:(\\?)|(\\!))\\s*)?(=|:|;|,|$))))|(?<=\\})",
1104 "patterns": [
1105 {
1106 "include": "#variable-initializer"
1107 },
1108 {
1109 "include": "#type-annotation"
1110 },
1111 {
1112 "include": "#string"
1113 },
1114 {
1115 "include": "#array-literal"
1116 },
1117 {
1118 "include": "#numeric-literal"
1119 },
1120 {
1121 "include": "#comment"
1122 },
1123 {
1124 "match": "(?x)(\\#?[_$[:alpha:]][_$[:alnum:]]*)(?:(\\?)|(\\!))?(?=\\s*\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
1125 "captures": {
1126 "1": {
1127 "name": "meta.definition.property.js entity.name.function.js"
1128 },
1129 "2": {
1130 "name": "keyword.operator.optional.js"
1131 },
1132 "3": {
1133 "name": "keyword.operator.definiteassignment.js"
1134 }
1135 }
1136 },
1137 {
1138 "name": "meta.definition.property.js variable.object.property.js",
1139 "match": "\\#?[_$[:alpha:]][_$[:alnum:]]*"
1140 },
1141 {
1142 "name": "keyword.operator.optional.js",
1143 "match": "\\?"
1144 },
1145 {
1146 "name": "keyword.operator.definiteassignment.js",
1147 "match": "\\!"
1148 }
1149 ]
1150 },
1151 "variable-initializer": {
1152 "patterns": [
1153 {
1154 "begin": "(?<!=|!)(=)(?!=)(?=\\s*\\S)(?!\\s*.*=>\\s*$)",
1155 "beginCaptures": {
1156 "1": {
1157 "name": "keyword.operator.assignment.js"
1158 }
1159 },
1160 "end": "(?=$|^|[,);}\\]]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
1161 "patterns": [
1162 {
1163 "include": "#expression"
1164 }
1165 ]
1166 },
1167 {
1168 "begin": "(?<!=|!)(=)(?!=)",
1169 "beginCaptures": {
1170 "1": {
1171 "name": "keyword.operator.assignment.js"
1172 }
1173 },
1174 "end": "(?=[,);}\\]]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))|(?=^\\s*$)|(?<=\\S)(?<!=)(?=\\s*$)",
1175 "patterns": [
1176 {
1177 "include": "#expression"
1178 }
1179 ]
1180 }
1181 ]
1182 },
1183 "function-declaration": {
1184 "name": "meta.function.js",
1185 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
1186 "beginCaptures": {
1187 "1": {
1188 "name": "keyword.control.export.js"
1189 },
1190 "2": {
1191 "name": "storage.modifier.js"
1192 },
1193 "3": {
1194 "name": "storage.modifier.async.js"
1195 },
1196 "4": {
1197 "name": "storage.type.function.js"
1198 },
1199 "5": {
1200 "name": "keyword.generator.asterisk.js"
1201 },
1202 "6": {
1203 "name": "meta.definition.function.js entity.name.function.js"
1204 }
1205 },
1206 "end": "(?=;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))|(?<=\\})",
1207 "patterns": [
1208 {
1209 "include": "#function-name"
1210 },
1211 {
1212 "include": "#function-body"
1213 }
1214 ]
1215 },
1216 "function-expression": {
1217 "name": "meta.function.expression.js",
1218 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
1219 "beginCaptures": {
1220 "1": {
1221 "name": "storage.modifier.async.js"
1222 },
1223 "2": {
1224 "name": "storage.type.function.js"
1225 },
1226 "3": {
1227 "name": "keyword.generator.asterisk.js"
1228 },
1229 "4": {
1230 "name": "meta.definition.function.js entity.name.function.js"
1231 }
1232 },
1233 "end": "(?=;)|(?<=\\})",
1234 "patterns": [
1235 {
1236 "include": "#function-name"
1237 },
1238 {
1239 "include": "#single-line-comment-consuming-line-ending"
1240 },
1241 {
1242 "include": "#function-body"
1243 }
1244 ]
1245 },
1246 "function-name": {
1247 "name": "meta.definition.function.js entity.name.function.js",
1248 "match": "[_$[:alpha:]][_$[:alnum:]]*"
1249 },
1250 "function-body": {
1251 "patterns": [
1252 {
1253 "include": "#comment"
1254 },
1255 {
1256 "include": "#type-parameters"
1257 },
1258 {
1259 "include": "#function-parameters"
1260 },
1261 {
1262 "include": "#return-type"
1263 },
1264 {
1265 "include": "#type-function-return-type"
1266 },
1267 {
1268 "include": "#decl-block"
1269 },
1270 {
1271 "name": "keyword.generator.asterisk.js",
1272 "match": "\\*"
1273 }
1274 ]
1275 },
1276 "method-declaration": {
1277 "patterns": [
1278 {
1279 "name": "meta.method.declaration.js",
1280 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?\\s*\\b(constructor)\\b(?!:)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1281 "beginCaptures": {
1282 "1": {
1283 "name": "storage.modifier.js"
1284 },
1285 "2": {
1286 "name": "storage.modifier.js"
1287 },
1288 "3": {
1289 "name": "storage.modifier.js"
1290 },
1291 "4": {
1292 "name": "storage.modifier.async.js"
1293 },
1294 "5": {
1295 "name": "storage.type.js"
1296 }
1297 },
1298 "end": "(?=\\}|;|,|$)|(?<=\\})",
1299 "patterns": [
1300 {
1301 "include": "#method-declaration-name"
1302 },
1303 {
1304 "include": "#function-body"
1305 }
1306 ]
1307 },
1308 {
1309 "name": "meta.method.declaration.js",
1310 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:(?:\\s*\\b(new)\\b(?!:)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(?:(\\*)\\s*)?)(?=\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])",
1311 "beginCaptures": {
1312 "1": {
1313 "name": "storage.modifier.js"
1314 },
1315 "2": {
1316 "name": "storage.modifier.js"
1317 },
1318 "3": {
1319 "name": "storage.modifier.js"
1320 },
1321 "4": {
1322 "name": "storage.modifier.async.js"
1323 },
1324 "5": {
1325 "name": "keyword.operator.new.js"
1326 },
1327 "6": {
1328 "name": "keyword.generator.asterisk.js"
1329 }
1330 },
1331 "end": "(?=\\}|;|,|$)|(?<=\\})",
1332 "patterns": [
1333 {
1334 "include": "#method-declaration-name"
1335 },
1336 {
1337 "include": "#function-body"
1338 }
1339 ]
1340 },
1341 {
1342 "name": "meta.method.declaration.js",
1343 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=\\s*(((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])",
1344 "beginCaptures": {
1345 "1": {
1346 "name": "storage.modifier.js"
1347 },
1348 "2": {
1349 "name": "storage.modifier.js"
1350 },
1351 "3": {
1352 "name": "storage.modifier.js"
1353 },
1354 "4": {
1355 "name": "storage.modifier.async.js"
1356 },
1357 "5": {
1358 "name": "storage.type.property.js"
1359 },
1360 "6": {
1361 "name": "keyword.generator.asterisk.js"
1362 }
1363 },
1364 "end": "(?=\\}|;|,|$)|(?<=\\})",
1365 "patterns": [
1366 {
1367 "include": "#method-declaration-name"
1368 },
1369 {
1370 "include": "#function-body"
1371 }
1372 ]
1373 }
1374 ]
1375 },
1376 "object-literal-method-declaration": {
1377 "name": "meta.method.declaration.js",
1378 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=\\s*(((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])",
1379 "beginCaptures": {
1380 "1": {
1381 "name": "storage.modifier.async.js"
1382 },
1383 "2": {
1384 "name": "storage.type.property.js"
1385 },
1386 "3": {
1387 "name": "keyword.generator.asterisk.js"
1388 }
1389 },
1390 "end": "(?=\\}|;|,)|(?<=\\})",
1391 "patterns": [
1392 {
1393 "include": "#method-declaration-name"
1394 },
1395 {
1396 "include": "#function-body"
1397 },
1398 {
1399 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=\\s*(((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])",
1400 "beginCaptures": {
1401 "1": {
1402 "name": "storage.modifier.async.js"
1403 },
1404 "2": {
1405 "name": "storage.type.property.js"
1406 },
1407 "3": {
1408 "name": "keyword.generator.asterisk.js"
1409 }
1410 },
1411 "end": "(?=\\(|\\<)",
1412 "patterns": [
1413 {
1414 "include": "#method-declaration-name"
1415 }
1416 ]
1417 }
1418 ]
1419 },
1420 "method-declaration-name": {
1421 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??)\\s*[\\(\\<])",
1422 "end": "(?=\\(|\\<)",
1423 "patterns": [
1424 {
1425 "include": "#string"
1426 },
1427 {
1428 "include": "#array-literal"
1429 },
1430 {
1431 "include": "#numeric-literal"
1432 },
1433 {
1434 "name": "meta.definition.method.js entity.name.function.js",
1435 "match": "[_$[:alpha:]][_$[:alnum:]]*"
1436 },
1437 {
1438 "name": "keyword.operator.optional.js",
1439 "match": "\\?"
1440 }
1441 ]
1442 },
1443 "arrow-function": {
1444 "patterns": [
1445 {
1446 "name": "meta.arrow.js",
1447 "match": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?==>)",
1448 "captures": {
1449 "1": {
1450 "name": "storage.modifier.async.js"
1451 },
1452 "2": {
1453 "name": "variable.parameter.js"
1454 }
1455 }
1456 },
1457 {
1458 "name": "meta.arrow.js",
1459 "begin": "(?x) (?:\n (?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\n)? ((?<![})!\\]])\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)",
1460 "beginCaptures": {
1461 "1": {
1462 "name": "storage.modifier.async.js"
1463 }
1464 },
1465 "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
1466 "patterns": [
1467 {
1468 "include": "#comment"
1469 },
1470 {
1471 "include": "#type-parameters"
1472 },
1473 {
1474 "include": "#function-parameters"
1475 },
1476 {
1477 "include": "#arrow-return-type"
1478 },
1479 {
1480 "include": "#possibly-arrow-return-type"
1481 }
1482 ]
1483 },
1484 {
1485 "name": "meta.arrow.js",
1486 "begin": "=>",
1487 "beginCaptures": {
1488 "0": {
1489 "name": "storage.type.function.arrow.js"
1490 }
1491 },
1492 "end": "((?<=\\}|\\S)(?<!=>)|((?!\\{)(?=\\S)))(?!\\/[\\/\\*])",
1493 "patterns": [
1494 {
1495 "include": "#single-line-comment-consuming-line-ending"
1496 },
1497 {
1498 "include": "#decl-block"
1499 },
1500 {
1501 "include": "#expression"
1502 }
1503 ]
1504 }
1505 ]
1506 },
1507 "indexer-declaration": {
1508 "name": "meta.indexer.declaration.js",
1509 "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s*)?\\s*(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:)",
1510 "beginCaptures": {
1511 "1": {
1512 "name": "storage.modifier.js"
1513 },
1514 "2": {
1515 "name": "meta.brace.square.js"
1516 },
1517 "3": {
1518 "name": "variable.parameter.js"
1519 }
1520 },
1521 "end": "(\\])\\s*(\\?\\s*)?|$",
1522 "endCaptures": {
1523 "1": {
1524 "name": "meta.brace.square.js"
1525 },
1526 "2": {
1527 "name": "keyword.operator.optional.js"
1528 }
1529 },
1530 "patterns": [
1531 {
1532 "include": "#type-annotation"
1533 }
1534 ]
1535 },
1536 "indexer-mapped-type-declaration": {
1537 "name": "meta.indexer.mappedtype.declaration.js",
1538 "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([+-])?(readonly)\\s*)?\\s*(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s+(in)\\s+",
1539 "beginCaptures": {
1540 "1": {
1541 "name": "keyword.operator.type.modifier.js"
1542 },
1543 "2": {
1544 "name": "storage.modifier.js"
1545 },
1546 "3": {
1547 "name": "meta.brace.square.js"
1548 },
1549 "4": {
1550 "name": "entity.name.type.js"
1551 },
1552 "5": {
1553 "name": "keyword.operator.expression.in.js"
1554 }
1555 },
1556 "end": "(\\])([+-])?\\s*(\\?\\s*)?|$",
1557 "endCaptures": {
1558 "1": {
1559 "name": "meta.brace.square.js"
1560 },
1561 "2": {
1562 "name": "keyword.operator.type.modifier.js"
1563 },
1564 "3": {
1565 "name": "keyword.operator.optional.js"
1566 }
1567 },
1568 "patterns": [
1569 {
1570 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+",
1571 "captures": {
1572 "1": {
1573 "name": "keyword.control.as.js"
1574 }
1575 }
1576 },
1577 {
1578 "include": "#type"
1579 }
1580 ]
1581 },
1582 "function-parameters": {
1583 "name": "meta.parameters.js",
1584 "begin": "\\(",
1585 "beginCaptures": {
1586 "0": {
1587 "name": "punctuation.definition.parameters.begin.js"
1588 }
1589 },
1590 "end": "\\)",
1591 "endCaptures": {
1592 "0": {
1593 "name": "punctuation.definition.parameters.end.js"
1594 }
1595 },
1596 "patterns": [
1597 {
1598 "include": "#function-parameters-body"
1599 }
1600 ]
1601 },
1602 "function-parameters-body": {
1603 "patterns": [
1604 {
1605 "include": "#comment"
1606 },
1607 {
1608 "include": "#string"
1609 },
1610 {
1611 "include": "#decorator"
1612 },
1613 {
1614 "include": "#destructuring-parameter"
1615 },
1616 {
1617 "include": "#parameter-name"
1618 },
1619 {
1620 "include": "#parameter-type-annotation"
1621 },
1622 {
1623 "include": "#variable-initializer"
1624 },
1625 {
1626 "name": "punctuation.separator.parameter.js",
1627 "match": ","
1628 }
1629 ]
1630 },
1631 "class-declaration": {
1632 "name": "meta.class.js",
1633 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(?:(abstract)\\s+)?\\b(class)\\b(?=\\s+|/[/*])",
1634 "beginCaptures": {
1635 "1": {
1636 "name": "keyword.control.export.js"
1637 },
1638 "2": {
1639 "name": "storage.modifier.js"
1640 },
1641 "3": {
1642 "name": "storage.modifier.js"
1643 },
1644 "4": {
1645 "name": "storage.type.class.js"
1646 }
1647 },
1648 "end": "(?<=\\})",
1649 "patterns": [
1650 {
1651 "include": "#class-declaration-or-expression-patterns"
1652 }
1653 ]
1654 },
1655 "class-expression": {
1656 "name": "meta.class.js",
1657 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(class)\\b(?=\\s+|[<{]|\\/[\\/*])",
1658 "beginCaptures": {
1659 "1": {
1660 "name": "storage.modifier.js"
1661 },
1662 "2": {
1663 "name": "storage.type.class.js"
1664 }
1665 },
1666 "end": "(?<=\\})",
1667 "patterns": [
1668 {
1669 "include": "#class-declaration-or-expression-patterns"
1670 }
1671 ]
1672 },
1673 "class-declaration-or-expression-patterns": {
1674 "patterns": [
1675 {
1676 "include": "#comment"
1677 },
1678 {
1679 "include": "#class-or-interface-heritage"
1680 },
1681 {
1682 "match": "[_$[:alpha:]][_$[:alnum:]]*",
1683 "captures": {
1684 "0": {
1685 "name": "entity.name.type.class.js"
1686 }
1687 }
1688 },
1689 {
1690 "include": "#type-parameters"
1691 },
1692 {
1693 "include": "#class-or-interface-body"
1694 }
1695 ]
1696 },
1697 "interface-declaration": {
1698 "name": "meta.interface.js",
1699 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(?:(abstract)\\s+)?\\b(interface)\\b(?=\\s+|/[/*])",
1700 "beginCaptures": {
1701 "1": {
1702 "name": "keyword.control.export.js"
1703 },
1704 "2": {
1705 "name": "storage.modifier.js"
1706 },
1707 "3": {
1708 "name": "storage.modifier.js"
1709 },
1710 "4": {
1711 "name": "storage.type.interface.js"
1712 }
1713 },
1714 "end": "(?<=\\})",
1715 "patterns": [
1716 {
1717 "include": "#comment"
1718 },
1719 {
1720 "include": "#class-or-interface-heritage"
1721 },
1722 {
1723 "match": "[_$[:alpha:]][_$[:alnum:]]*",
1724 "captures": {
1725 "0": {
1726 "name": "entity.name.type.interface.js"
1727 }
1728 }
1729 },
1730 {
1731 "include": "#type-parameters"
1732 },
1733 {
1734 "include": "#class-or-interface-body"
1735 }
1736 ]
1737 },
1738 "class-or-interface-heritage": {
1739 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(extends|implements)\\b)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1740 "beginCaptures": {
1741 "1": {
1742 "name": "storage.modifier.js"
1743 }
1744 },
1745 "end": "(?=\\{)",
1746 "patterns": [
1747 {
1748 "include": "#comment"
1749 },
1750 {
1751 "include": "#class-or-interface-heritage"
1752 },
1753 {
1754 "include": "#type-parameters"
1755 },
1756 {
1757 "include": "#expressionWithoutIdentifiers"
1758 },
1759 {
1760 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s*\\??\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)*\\s*)",
1761 "captures": {
1762 "1": {
1763 "name": "entity.name.type.module.js"
1764 },
1765 "2": {
1766 "name": "punctuation.accessor.js"
1767 },
1768 "3": {
1769 "name": "punctuation.accessor.optional.js"
1770 }
1771 }
1772 },
1773 {
1774 "match": "([_$[:alpha:]][_$[:alnum:]]*)",
1775 "captures": {
1776 "1": {
1777 "name": "entity.other.inherited-class.js"
1778 }
1779 }
1780 },
1781 {
1782 "include": "#expressionPunctuations"
1783 }
1784 ]
1785 },
1786 "class-or-interface-body": {
1787 "begin": "\\{",
1788 "beginCaptures": {
1789 "0": {
1790 "name": "punctuation.definition.block.js"
1791 }
1792 },
1793 "end": "\\}",
1794 "endCaptures": {
1795 "0": {
1796 "name": "punctuation.definition.block.js"
1797 }
1798 },
1799 "patterns": [
1800 {
1801 "include": "#comment"
1802 },
1803 {
1804 "include": "#decorator"
1805 },
1806 {
1807 "begin": "(?<=:)\\s*",
1808 "end": "(?=\\s|[;),}\\]:\\-\\+]|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
1809 "patterns": [
1810 {
1811 "include": "#expression"
1812 }
1813 ]
1814 },
1815 {
1816 "include": "#method-declaration"
1817 },
1818 {
1819 "include": "#indexer-declaration"
1820 },
1821 {
1822 "include": "#field-declaration"
1823 },
1824 {
1825 "include": "#string"
1826 },
1827 {
1828 "include": "#type-annotation"
1829 },
1830 {
1831 "include": "#variable-initializer"
1832 },
1833 {
1834 "include": "#access-modifier"
1835 },
1836 {
1837 "include": "#property-accessor"
1838 },
1839 {
1840 "include": "#async-modifier"
1841 },
1842 {
1843 "include": "#after-operator-block-as-object-literal"
1844 },
1845 {
1846 "include": "#decl-block"
1847 },
1848 {
1849 "include": "#expression"
1850 },
1851 {
1852 "include": "#punctuation-comma"
1853 },
1854 {
1855 "include": "#punctuation-semicolon"
1856 }
1857 ]
1858 },
1859 "access-modifier": {
1860 "name": "storage.modifier.js",
1861 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(abstract|declare|override|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1862 },
1863 "property-accessor": {
1864 "name": "storage.type.property.js",
1865 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(get|set)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1866 },
1867 "async-modifier": {
1868 "name": "storage.modifier.async.js",
1869 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(async)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1870 },
1871 "enum-declaration": {
1872 "name": "meta.enum.declaration.js",
1873 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?(?:\\b(const)\\s+)?\\b(enum)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
1874 "beginCaptures": {
1875 "1": {
1876 "name": "keyword.control.export.js"
1877 },
1878 "2": {
1879 "name": "storage.modifier.js"
1880 },
1881 "3": {
1882 "name": "storage.modifier.js"
1883 },
1884 "4": {
1885 "name": "storage.type.enum.js"
1886 },
1887 "5": {
1888 "name": "entity.name.type.enum.js"
1889 }
1890 },
1891 "end": "(?<=\\})",
1892 "patterns": [
1893 {
1894 "include": "#comment"
1895 },
1896 {
1897 "begin": "\\{",
1898 "beginCaptures": {
1899 "0": {
1900 "name": "punctuation.definition.block.js"
1901 }
1902 },
1903 "end": "\\}",
1904 "endCaptures": {
1905 "0": {
1906 "name": "punctuation.definition.block.js"
1907 }
1908 },
1909 "patterns": [
1910 {
1911 "include": "#comment"
1912 },
1913 {
1914 "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
1915 "beginCaptures": {
1916 "0": {
1917 "name": "variable.other.enummember.js"
1918 }
1919 },
1920 "end": "(?=,|\\}|$)",
1921 "patterns": [
1922 {
1923 "include": "#comment"
1924 },
1925 {
1926 "include": "#variable-initializer"
1927 }
1928 ]
1929 },
1930 {
1931 "begin": "(?=((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\])))",
1932 "end": "(?=,|\\}|$)",
1933 "patterns": [
1934 {
1935 "include": "#string"
1936 },
1937 {
1938 "include": "#array-literal"
1939 },
1940 {
1941 "include": "#comment"
1942 },
1943 {
1944 "include": "#variable-initializer"
1945 }
1946 ]
1947 },
1948 {
1949 "include": "#punctuation-comma"
1950 }
1951 ]
1952 }
1953 ]
1954 },
1955 "namespace-declaration": {
1956 "name": "meta.namespace.declaration.js",
1957 "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(namespace|module)\\s+(?=[_$[:alpha:]\"'`]))",
1958 "beginCaptures": {
1959 "1": {
1960 "name": "keyword.control.export.js"
1961 },
1962 "2": {
1963 "name": "storage.modifier.js"
1964 },
1965 "3": {
1966 "name": "storage.type.namespace.js"
1967 }
1968 },
1969 "end": "(?<=\\})|(?=;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
1970 "patterns": [
1971 {
1972 "include": "#comment"
1973 },
1974 {
1975 "include": "#string"
1976 },
1977 {
1978 "name": "entity.name.type.module.js",
1979 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
1980 },
1981 {
1982 "include": "#punctuation-accessor"
1983 },
1984 {
1985 "include": "#decl-block"
1986 }
1987 ]
1988 },
1989 "type-alias-declaration": {
1990 "name": "meta.type.declaration.js",
1991 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(type)\\b\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*",
1992 "beginCaptures": {
1993 "1": {
1994 "name": "keyword.control.export.js"
1995 },
1996 "2": {
1997 "name": "storage.modifier.js"
1998 },
1999 "3": {
2000 "name": "storage.type.type.js"
2001 },
2002 "4": {
2003 "name": "entity.name.type.alias.js"
2004 }
2005 },
2006 "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
2007 "patterns": [
2008 {
2009 "include": "#comment"
2010 },
2011 {
2012 "include": "#type-parameters"
2013 },
2014 {
2015 "begin": "(=)\\s*(intrinsic)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2016 "beginCaptures": {
2017 "1": {
2018 "name": "keyword.operator.assignment.js"
2019 },
2020 "2": {
2021 "name": "keyword.control.intrinsic.js"
2022 }
2023 },
2024 "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
2025 "patterns": [
2026 {
2027 "include": "#type"
2028 }
2029 ]
2030 },
2031 {
2032 "begin": "(=)\\s*",
2033 "beginCaptures": {
2034 "1": {
2035 "name": "keyword.operator.assignment.js"
2036 }
2037 },
2038 "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
2039 "patterns": [
2040 {
2041 "include": "#type"
2042 }
2043 ]
2044 }
2045 ]
2046 },
2047 "import-equals-declaration": {
2048 "patterns": [
2049 {
2050 "name": "meta.import-equals.external.js",
2051 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type))?\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(require)\\s*(\\()",
2052 "beginCaptures": {
2053 "1": {
2054 "name": "keyword.control.export.js"
2055 },
2056 "2": {
2057 "name": "storage.modifier.js"
2058 },
2059 "3": {
2060 "name": "keyword.control.import.js"
2061 },
2062 "4": {
2063 "name": "keyword.control.type.js"
2064 },
2065 "5": {
2066 "name": "variable.other.readwrite.alias.js"
2067 },
2068 "6": {
2069 "name": "keyword.operator.assignment.js"
2070 },
2071 "7": {
2072 "name": "keyword.control.require.js"
2073 },
2074 "8": {
2075 "name": "meta.brace.round.js"
2076 }
2077 },
2078 "end": "\\)",
2079 "endCaptures": {
2080 "0": {
2081 "name": "meta.brace.round.js"
2082 }
2083 },
2084 "patterns": [
2085 {
2086 "include": "#comment"
2087 },
2088 {
2089 "include": "#string"
2090 }
2091 ]
2092 },
2093 {
2094 "name": "meta.import-equals.internal.js",
2095 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type))?\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(?!require\\b)",
2096 "beginCaptures": {
2097 "1": {
2098 "name": "keyword.control.export.js"
2099 },
2100 "2": {
2101 "name": "storage.modifier.js"
2102 },
2103 "3": {
2104 "name": "keyword.control.import.js"
2105 },
2106 "4": {
2107 "name": "keyword.control.type.js"
2108 },
2109 "5": {
2110 "name": "variable.other.readwrite.alias.js"
2111 },
2112 "6": {
2113 "name": "keyword.operator.assignment.js"
2114 }
2115 },
2116 "end": "(?=;|$|^)",
2117 "patterns": [
2118 {
2119 "include": "#single-line-comment-consuming-line-ending"
2120 },
2121 {
2122 "include": "#comment"
2123 },
2124 {
2125 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))",
2126 "captures": {
2127 "1": {
2128 "name": "entity.name.type.module.js"
2129 },
2130 "2": {
2131 "name": "punctuation.accessor.js"
2132 },
2133 "3": {
2134 "name": "punctuation.accessor.optional.js"
2135 }
2136 }
2137 },
2138 {
2139 "name": "variable.other.readwrite.js",
2140 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
2141 }
2142 ]
2143 }
2144 ]
2145 },
2146 "import-declaration": {
2147 "name": "meta.import.js",
2148 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type)(?!\\s+from))?(?!\\s*[:\\(])(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2149 "beginCaptures": {
2150 "1": {
2151 "name": "keyword.control.export.js"
2152 },
2153 "2": {
2154 "name": "storage.modifier.js"
2155 },
2156 "3": {
2157 "name": "keyword.control.import.js"
2158 },
2159 "4": {
2160 "name": "keyword.control.type.js"
2161 }
2162 },
2163 "end": "(?<!^import|[^\\._$[:alnum:]]import)(?=;|$|^)",
2164 "patterns": [
2165 {
2166 "include": "#single-line-comment-consuming-line-ending"
2167 },
2168 {
2169 "include": "#comment"
2170 },
2171 {
2172 "include": "#string"
2173 },
2174 {
2175 "begin": "(?<=^import|[^\\._$[:alnum:]]import)(?!\\s*[\"'])",
2176 "end": "\\bfrom\\b",
2177 "endCaptures": {
2178 "0": {
2179 "name": "keyword.control.from.js"
2180 }
2181 },
2182 "patterns": [
2183 {
2184 "include": "#import-export-declaration"
2185 }
2186 ]
2187 },
2188 {
2189 "include": "#import-export-declaration"
2190 }
2191 ]
2192 },
2193 "export-declaration": {
2194 "patterns": [
2195 {
2196 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)\\s+(as)\\s+(namespace)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
2197 "captures": {
2198 "1": {
2199 "name": "keyword.control.export.js"
2200 },
2201 "2": {
2202 "name": "keyword.control.as.js"
2203 },
2204 "3": {
2205 "name": "storage.type.namespace.js"
2206 },
2207 "4": {
2208 "name": "entity.name.type.module.js"
2209 }
2210 }
2211 },
2212 {
2213 "name": "meta.export.default.js",
2214 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?:\\s+(type))?(?:(?:\\s*(=))|(?:\\s+(default)(?=\\s+)))",
2215 "beginCaptures": {
2216 "1": {
2217 "name": "keyword.control.export.js"
2218 },
2219 "2": {
2220 "name": "keyword.control.type.js"
2221 },
2222 "3": {
2223 "name": "keyword.operator.assignment.js"
2224 },
2225 "4": {
2226 "name": "keyword.control.default.js"
2227 }
2228 },
2229 "end": "(?=$|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
2230 "patterns": [
2231 {
2232 "include": "#interface-declaration"
2233 },
2234 {
2235 "include": "#expression"
2236 }
2237 ]
2238 },
2239 {
2240 "name": "meta.export.js",
2241 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?:\\s+(type))?\\b(?!(\\$)|(\\s*:))((?=\\s*[\\{*])|((?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s|,))(?!\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b)))",
2242 "beginCaptures": {
2243 "1": {
2244 "name": "keyword.control.export.js"
2245 },
2246 "2": {
2247 "name": "keyword.control.type.js"
2248 }
2249 },
2250 "end": "(?=$|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
2251 "patterns": [
2252 {
2253 "include": "#import-export-declaration"
2254 }
2255 ]
2256 }
2257 ]
2258 },
2259 "import-export-declaration": {
2260 "patterns": [
2261 {
2262 "include": "#comment"
2263 },
2264 {
2265 "include": "#string"
2266 },
2267 {
2268 "include": "#import-export-block"
2269 },
2270 {
2271 "name": "keyword.control.from.js",
2272 "match": "\\bfrom\\b"
2273 },
2274 {
2275 "include": "#import-export-assert-clause"
2276 },
2277 {
2278 "include": "#import-export-clause"
2279 }
2280 ]
2281 },
2282 "import-export-assert-clause": {
2283 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(assert)\\s*(\\{)",
2284 "beginCaptures": {
2285 "1": {
2286 "name": "keyword.control.assert.js"
2287 },
2288 "2": {
2289 "name": "punctuation.definition.block.js"
2290 }
2291 },
2292 "end": "\\}",
2293 "endCaptures": {
2294 "0": {
2295 "name": "punctuation.definition.block.js"
2296 }
2297 },
2298 "patterns": [
2299 {
2300 "include": "#comment"
2301 },
2302 {
2303 "include": "#string"
2304 },
2305 {
2306 "name": "meta.object-literal.key.js",
2307 "match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)"
2308 },
2309 {
2310 "name": "punctuation.separator.key-value.js",
2311 "match": ":"
2312 }
2313 ]
2314 },
2315 "import-export-block": {
2316 "name": "meta.block.js",
2317 "begin": "\\{",
2318 "beginCaptures": {
2319 "0": {
2320 "name": "punctuation.definition.block.js"
2321 }
2322 },
2323 "end": "\\}",
2324 "endCaptures": {
2325 "0": {
2326 "name": "punctuation.definition.block.js"
2327 }
2328 },
2329 "patterns": [
2330 {
2331 "include": "#import-export-clause"
2332 }
2333 ]
2334 },
2335 "import-export-clause": {
2336 "patterns": [
2337 {
2338 "include": "#comment"
2339 },
2340 {
2341 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(?:(\\btype)\\s+)?(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*)))\\s+(as)\\s+(?:(default(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|([_$[:alpha:]][_$[:alnum:]]*))",
2342 "captures": {
2343 "1": {
2344 "name": "keyword.control.type.js"
2345 },
2346 "2": {
2347 "name": "keyword.control.default.js"
2348 },
2349 "3": {
2350 "name": "constant.language.import-export-all.js"
2351 },
2352 "4": {
2353 "name": "variable.other.readwrite.js"
2354 },
2355 "5": {
2356 "name": "keyword.control.as.js"
2357 },
2358 "6": {
2359 "name": "keyword.control.default.js"
2360 },
2361 "7": {
2362 "name": "variable.other.readwrite.alias.js"
2363 }
2364 }
2365 },
2366 {
2367 "include": "#punctuation-comma"
2368 },
2369 {
2370 "name": "constant.language.import-export-all.js",
2371 "match": "\\*"
2372 },
2373 {
2374 "name": "keyword.control.default.js",
2375 "match": "\\b(default)\\b"
2376 },
2377 {
2378 "match": "(?:(\\btype)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)",
2379 "captures": {
2380 "1": {
2381 "name": "keyword.control.type.js"
2382 },
2383 "2": {
2384 "name": "variable.other.readwrite.alias.js"
2385 }
2386 }
2387 }
2388 ]
2389 },
2390 "switch-statement": {
2391 "name": "switch-statement.expr.js",
2392 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bswitch\\s*\\()",
2393 "end": "\\}",
2394 "endCaptures": {
2395 "0": {
2396 "name": "punctuation.definition.block.js"
2397 }
2398 },
2399 "patterns": [
2400 {
2401 "include": "#comment"
2402 },
2403 {
2404 "name": "switch-expression.expr.js",
2405 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(switch)\\s*(\\()",
2406 "beginCaptures": {
2407 "1": {
2408 "name": "keyword.control.switch.js"
2409 },
2410 "2": {
2411 "name": "meta.brace.round.js"
2412 }
2413 },
2414 "end": "\\)",
2415 "endCaptures": {
2416 "0": {
2417 "name": "meta.brace.round.js"
2418 }
2419 },
2420 "patterns": [
2421 {
2422 "include": "#expression"
2423 }
2424 ]
2425 },
2426 {
2427 "name": "switch-block.expr.js",
2428 "begin": "\\{",
2429 "beginCaptures": {
2430 "0": {
2431 "name": "punctuation.definition.block.js"
2432 }
2433 },
2434 "end": "(?=\\})",
2435 "patterns": [
2436 {
2437 "name": "case-clause.expr.js",
2438 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default(?=:))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2439 "beginCaptures": {
2440 "1": {
2441 "name": "keyword.control.switch.js"
2442 }
2443 },
2444 "end": "(?=:)",
2445 "patterns": [
2446 {
2447 "include": "#expression"
2448 }
2449 ]
2450 },
2451 {
2452 "begin": "(:)\\s*(\\{)",
2453 "beginCaptures": {
2454 "1": {
2455 "name": "case-clause.expr.js punctuation.definition.section.case-statement.js"
2456 },
2457 "2": {
2458 "name": "meta.block.js punctuation.definition.block.js"
2459 }
2460 },
2461 "end": "\\}",
2462 "endCaptures": {
2463 "0": {
2464 "name": "meta.block.js punctuation.definition.block.js"
2465 }
2466 },
2467 "contentName": "meta.block.js",
2468 "patterns": [
2469 {
2470 "include": "#statements"
2471 }
2472 ]
2473 },
2474 {
2475 "match": "(:)",
2476 "captures": {
2477 "0": {
2478 "name": "case-clause.expr.js punctuation.definition.section.case-statement.js"
2479 }
2480 }
2481 },
2482 {
2483 "include": "#statements"
2484 }
2485 ]
2486 }
2487 ]
2488 },
2489 "for-loop": {
2490 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))for(?=((\\s+|(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*))await)?\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)?(\\())",
2491 "beginCaptures": {
2492 "0": {
2493 "name": "keyword.control.loop.js"
2494 }
2495 },
2496 "end": "(?<=\\))",
2497 "patterns": [
2498 {
2499 "include": "#comment"
2500 },
2501 {
2502 "name": "keyword.control.loop.js",
2503 "match": "await"
2504 },
2505 {
2506 "begin": "\\(",
2507 "beginCaptures": {
2508 "0": {
2509 "name": "meta.brace.round.js"
2510 }
2511 },
2512 "end": "\\)",
2513 "endCaptures": {
2514 "0": {
2515 "name": "meta.brace.round.js"
2516 }
2517 },
2518 "patterns": [
2519 {
2520 "include": "#var-expr"
2521 },
2522 {
2523 "include": "#expression"
2524 },
2525 {
2526 "include": "#punctuation-semicolon"
2527 }
2528 ]
2529 }
2530 ]
2531 },
2532 "if-statement": {
2533 "patterns": [
2534 {
2535 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bif\\s*(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))\\s*(?!\\{))",
2536 "end": "(?=;|$|\\})",
2537 "patterns": [
2538 {
2539 "include": "#comment"
2540 },
2541 {
2542 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(if)\\s*(\\()",
2543 "beginCaptures": {
2544 "1": {
2545 "name": "keyword.control.conditional.js"
2546 },
2547 "2": {
2548 "name": "meta.brace.round.js"
2549 }
2550 },
2551 "end": "\\)",
2552 "endCaptures": {
2553 "0": {
2554 "name": "meta.brace.round.js"
2555 }
2556 },
2557 "patterns": [
2558 {
2559 "include": "#expression"
2560 }
2561 ]
2562 },
2563 {
2564 "name": "string.regexp.js",
2565 "begin": "(?<=\\))\\s*\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
2566 "beginCaptures": {
2567 "0": {
2568 "name": "punctuation.definition.string.begin.js"
2569 }
2570 },
2571 "end": "(/)([dgimsuy]*)",
2572 "endCaptures": {
2573 "1": {
2574 "name": "punctuation.definition.string.end.js"
2575 },
2576 "2": {
2577 "name": "keyword.other.js"
2578 }
2579 },
2580 "patterns": [
2581 {
2582 "include": "#regexp"
2583 }
2584 ]
2585 },
2586 {
2587 "include": "#statements"
2588 }
2589 ]
2590 }
2591 ]
2592 },
2593 "decl-block": {
2594 "name": "meta.block.js",
2595 "begin": "\\{",
2596 "beginCaptures": {
2597 "0": {
2598 "name": "punctuation.definition.block.js"
2599 }
2600 },
2601 "end": "\\}",
2602 "endCaptures": {
2603 "0": {
2604 "name": "punctuation.definition.block.js"
2605 }
2606 },
2607 "patterns": [
2608 {
2609 "include": "#statements"
2610 }
2611 ]
2612 },
2613 "after-operator-block-as-object-literal": {
2614 "name": "meta.objectliteral.js",
2615 "begin": "(?<!\\+\\+|--)(?<=[:=(,\\[?+!>]|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^yield|[^\\._$[:alnum:]]yield|^throw|[^\\._$[:alnum:]]throw|^in|[^\\._$[:alnum:]]in|^of|[^\\._$[:alnum:]]of|^typeof|[^\\._$[:alnum:]]typeof|&&|\\|\\||\\*)\\s*(\\{)",
2616 "beginCaptures": {
2617 "1": {
2618 "name": "punctuation.definition.block.js"
2619 }
2620 },
2621 "end": "\\}",
2622 "endCaptures": {
2623 "0": {
2624 "name": "punctuation.definition.block.js"
2625 }
2626 },
2627 "patterns": [
2628 {
2629 "include": "#object-member"
2630 }
2631 ]
2632 },
2633 "object-literal": {
2634 "name": "meta.objectliteral.js",
2635 "begin": "\\{",
2636 "beginCaptures": {
2637 "0": {
2638 "name": "punctuation.definition.block.js"
2639 }
2640 },
2641 "end": "\\}",
2642 "endCaptures": {
2643 "0": {
2644 "name": "punctuation.definition.block.js"
2645 }
2646 },
2647 "patterns": [
2648 {
2649 "include": "#object-member"
2650 }
2651 ]
2652 },
2653 "object-member": {
2654 "patterns": [
2655 {
2656 "include": "#comment"
2657 },
2658 {
2659 "include": "#object-literal-method-declaration"
2660 },
2661 {
2662 "name": "meta.object.member.js meta.object-literal.key.js",
2663 "begin": "(?=\\[)",
2664 "end": "(?=:)|((?<=[\\]])(?=\\s*[\\(\\<]))",
2665 "patterns": [
2666 {
2667 "include": "#comment"
2668 },
2669 {
2670 "include": "#array-literal"
2671 }
2672 ]
2673 },
2674 {
2675 "name": "meta.object.member.js meta.object-literal.key.js",
2676 "begin": "(?=[\\'\\\"\\`])",
2677 "end": "(?=:)|((?<=[\\'\\\"\\`])(?=((\\s*[\\(\\<,}])|(\\s+(as)\\s+))))",
2678 "patterns": [
2679 {
2680 "include": "#comment"
2681 },
2682 {
2683 "include": "#string"
2684 }
2685 ]
2686 },
2687 {
2688 "name": "meta.object.member.js meta.object-literal.key.js",
2689 "begin": "(?x)(?=(\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$)))",
2690 "end": "(?=:)|(?=\\s*([\\(\\<,}])|(\\s+as\\s+))",
2691 "patterns": [
2692 {
2693 "include": "#comment"
2694 },
2695 {
2696 "include": "#numeric-literal"
2697 }
2698 ]
2699 },
2700 {
2701 "name": "meta.method.declaration.js",
2702 "begin": "(?<=[\\]\\'\\\"\\`])(?=\\s*[\\(\\<])",
2703 "end": "(?=\\}|;|,)|(?<=\\})",
2704 "patterns": [
2705 {
2706 "include": "#function-body"
2707 }
2708 ]
2709 },
2710 {
2711 "name": "meta.object.member.js",
2712 "match": "(?![_$[:alpha:]])([[:digit:]]+)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)",
2713 "captures": {
2714 "0": {
2715 "name": "meta.object-literal.key.js"
2716 },
2717 "1": {
2718 "name": "constant.numeric.decimal.js"
2719 }
2720 }
2721 },
2722 {
2723 "name": "meta.object.member.js",
2724 "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
2725 "captures": {
2726 "0": {
2727 "name": "meta.object-literal.key.js"
2728 },
2729 "1": {
2730 "name": "entity.name.function.js"
2731 }
2732 }
2733 },
2734 {
2735 "name": "meta.object.member.js",
2736 "match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)",
2737 "captures": {
2738 "0": {
2739 "name": "meta.object-literal.key.js"
2740 }
2741 }
2742 },
2743 {
2744 "name": "meta.object.member.js",
2745 "begin": "\\.\\.\\.",
2746 "beginCaptures": {
2747 "0": {
2748 "name": "keyword.operator.spread.js"
2749 }
2750 },
2751 "end": "(?=,|\\})",
2752 "patterns": [
2753 {
2754 "include": "#expression"
2755 }
2756 ]
2757 },
2758 {
2759 "name": "meta.object.member.js",
2760 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=,|\\}|$|\\/\\/|\\/\\*)",
2761 "captures": {
2762 "1": {
2763 "name": "variable.other.readwrite.js"
2764 }
2765 }
2766 },
2767 {
2768 "name": "meta.object.member.js",
2769 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*([,}]|$))",
2770 "captures": {
2771 "1": {
2772 "name": "keyword.control.as.js"
2773 },
2774 "2": {
2775 "name": "storage.modifier.js"
2776 }
2777 }
2778 },
2779 {
2780 "name": "meta.object.member.js",
2781 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+",
2782 "beginCaptures": {
2783 "1": {
2784 "name": "keyword.control.as.js"
2785 }
2786 },
2787 "end": "(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|^|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+))",
2788 "patterns": [
2789 {
2790 "include": "#type"
2791 }
2792 ]
2793 },
2794 {
2795 "name": "meta.object.member.js",
2796 "begin": "(?=[_$[:alpha:]][_$[:alnum:]]*\\s*=)",
2797 "end": "(?=,|\\}|$|\\/\\/|\\/\\*)",
2798 "patterns": [
2799 {
2800 "include": "#expression"
2801 }
2802 ]
2803 },
2804 {
2805 "name": "meta.object.member.js",
2806 "begin": ":",
2807 "beginCaptures": {
2808 "0": {
2809 "name": "meta.object-literal.key.js punctuation.separator.key-value.js"
2810 }
2811 },
2812 "end": "(?=,|\\})",
2813 "patterns": [
2814 {
2815 "begin": "(?<=:)\\s*(async)?(?=\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)\\(\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
2816 "beginCaptures": {
2817 "1": {
2818 "name": "storage.modifier.async.js"
2819 }
2820 },
2821 "end": "(?<=\\))",
2822 "patterns": [
2823 {
2824 "include": "#type-parameters"
2825 },
2826 {
2827 "begin": "\\(",
2828 "beginCaptures": {
2829 "0": {
2830 "name": "meta.brace.round.js"
2831 }
2832 },
2833 "end": "\\)",
2834 "endCaptures": {
2835 "0": {
2836 "name": "meta.brace.round.js"
2837 }
2838 },
2839 "patterns": [
2840 {
2841 "include": "#expression-inside-possibly-arrow-parens"
2842 }
2843 ]
2844 }
2845 ]
2846 },
2847 {
2848 "begin": "(?<=:)\\s*(async)?\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
2849 "beginCaptures": {
2850 "1": {
2851 "name": "storage.modifier.async.js"
2852 },
2853 "2": {
2854 "name": "meta.brace.round.js"
2855 }
2856 },
2857 "end": "\\)",
2858 "endCaptures": {
2859 "0": {
2860 "name": "meta.brace.round.js"
2861 }
2862 },
2863 "patterns": [
2864 {
2865 "include": "#expression-inside-possibly-arrow-parens"
2866 }
2867 ]
2868 },
2869 {
2870 "begin": "(?<=:)\\s*(async)?\\s*(?=\\<\\s*$)",
2871 "beginCaptures": {
2872 "1": {
2873 "name": "storage.modifier.async.js"
2874 }
2875 },
2876 "end": "(?<=\\>)",
2877 "patterns": [
2878 {
2879 "include": "#type-parameters"
2880 }
2881 ]
2882 },
2883 {
2884 "begin": "(?<=\\>)\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
2885 "beginCaptures": {
2886 "1": {
2887 "name": "meta.brace.round.js"
2888 }
2889 },
2890 "end": "\\)",
2891 "endCaptures": {
2892 "0": {
2893 "name": "meta.brace.round.js"
2894 }
2895 },
2896 "patterns": [
2897 {
2898 "include": "#expression-inside-possibly-arrow-parens"
2899 }
2900 ]
2901 },
2902 {
2903 "include": "#possibly-arrow-return-type"
2904 },
2905 {
2906 "include": "#expression"
2907 }
2908 ]
2909 },
2910 {
2911 "include": "#punctuation-comma"
2912 }
2913 ]
2914 },
2915 "ternary-expression": {
2916 "begin": "(?!\\?\\.\\s*[^[:digit:]])(\\?)(?!\\?)",
2917 "beginCaptures": {
2918 "1": {
2919 "name": "keyword.operator.ternary.js"
2920 }
2921 },
2922 "end": "\\s*(:)",
2923 "endCaptures": {
2924 "1": {
2925 "name": "keyword.operator.ternary.js"
2926 }
2927 },
2928 "patterns": [
2929 {
2930 "include": "#expression"
2931 }
2932 ]
2933 },
2934 "function-call": {
2935 "patterns": [
2936 {
2937 "begin": "(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?\\())",
2938 "end": "(?<=\\))(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?\\())",
2939 "patterns": [
2940 {
2941 "name": "meta.function-call.js",
2942 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))",
2943 "end": "(?=\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?\\())",
2944 "patterns": [
2945 {
2946 "include": "#function-call-target"
2947 }
2948 ]
2949 },
2950 {
2951 "include": "#comment"
2952 },
2953 {
2954 "include": "#function-call-optionals"
2955 },
2956 {
2957 "include": "#type-arguments"
2958 },
2959 {
2960 "include": "#paren-expression"
2961 }
2962 ]
2963 },
2964 {
2965 "begin": "(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))",
2966 "end": "(?<=\\>)(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))",
2967 "patterns": [
2968 {
2969 "name": "meta.function-call.js",
2970 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))",
2971 "end": "(?=(<\\s*[\\{\\[\\(]\\s*$))",
2972 "patterns": [
2973 {
2974 "include": "#function-call-target"
2975 }
2976 ]
2977 },
2978 {
2979 "include": "#comment"
2980 },
2981 {
2982 "include": "#function-call-optionals"
2983 },
2984 {
2985 "include": "#type-arguments"
2986 }
2987 ]
2988 }
2989 ]
2990 },
2991 "function-call-target": {
2992 "patterns": [
2993 {
2994 "include": "#support-function-call-identifiers"
2995 },
2996 {
2997 "name": "entity.name.function.js",
2998 "match": "(\\#?[_$[:alpha:]][_$[:alnum:]]*)"
2999 }
3000 ]
3001 },
3002 "function-call-optionals": {
3003 "patterns": [
3004 {
3005 "name": "meta.function-call.js punctuation.accessor.optional.js",
3006 "match": "\\?\\."
3007 },
3008 {
3009 "name": "meta.function-call.js keyword.operator.definiteassignment.js",
3010 "match": "\\!"
3011 }
3012 ]
3013 },
3014 "support-function-call-identifiers": {
3015 "patterns": [
3016 {
3017 "include": "#literal"
3018 },
3019 {
3020 "include": "#support-objects"
3021 },
3022 {
3023 "include": "#object-identifiers"
3024 },
3025 {
3026 "include": "#punctuation-accessor"
3027 },
3028 {
3029 "name": "keyword.operator.expression.import.js",
3030 "match": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*[\\(]\\s*[\\\"\\'\\`]))"
3031 }
3032 ]
3033 },
3034 "new-expr": {
3035 "name": "new.expr.js",
3036 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3037 "beginCaptures": {
3038 "1": {
3039 "name": "keyword.operator.new.js"
3040 }
3041 },
3042 "end": "(?<=\\))|(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
3043 "patterns": [
3044 {
3045 "include": "#expression"
3046 }
3047 ]
3048 },
3049 "instanceof-expr": {
3050 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(instanceof)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3051 "beginCaptures": {
3052 "1": {
3053 "name": "keyword.operator.expression.instanceof.js"
3054 }
3055 },
3056 "end": "(?<=\\))|(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|(([\\&\\~\\^\\|]\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s+instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
3057 "patterns": [
3058 {
3059 "include": "#type"
3060 }
3061 ]
3062 },
3063 "paren-expression-possibly-arrow": {
3064 "patterns": [
3065 {
3066 "begin": "(?<=[(=,])\\s*(async)?(?=\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\(\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
3067 "beginCaptures": {
3068 "1": {
3069 "name": "storage.modifier.async.js"
3070 }
3071 },
3072 "end": "(?<=\\))",
3073 "patterns": [
3074 {
3075 "include": "#paren-expression-possibly-arrow-with-typeparameters"
3076 }
3077 ]
3078 },
3079 {
3080 "begin": "(?<=[(=,]|=>|^return|[^\\._$[:alnum:]]return)\\s*(async)?(?=\\s*((((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\()|(<))\\s*$)",
3081 "beginCaptures": {
3082 "1": {
3083 "name": "storage.modifier.async.js"
3084 }
3085 },
3086 "end": "(?<=\\))",
3087 "patterns": [
3088 {
3089 "include": "#paren-expression-possibly-arrow-with-typeparameters"
3090 }
3091 ]
3092 },
3093 {
3094 "include": "#possibly-arrow-return-type"
3095 }
3096 ]
3097 },
3098 "paren-expression-possibly-arrow-with-typeparameters": {
3099 "patterns": [
3100 {
3101 "include": "#type-parameters"
3102 },
3103 {
3104 "begin": "\\(",
3105 "beginCaptures": {
3106 "0": {
3107 "name": "meta.brace.round.js"
3108 }
3109 },
3110 "end": "\\)",
3111 "endCaptures": {
3112 "0": {
3113 "name": "meta.brace.round.js"
3114 }
3115 },
3116 "patterns": [
3117 {
3118 "include": "#expression-inside-possibly-arrow-parens"
3119 }
3120 ]
3121 }
3122 ]
3123 },
3124 "expression-inside-possibly-arrow-parens": {
3125 "patterns": [
3126 {
3127 "include": "#expressionWithoutIdentifiers"
3128 },
3129 {
3130 "include": "#comment"
3131 },
3132 {
3133 "include": "#string"
3134 },
3135 {
3136 "include": "#decorator"
3137 },
3138 {
3139 "include": "#destructuring-parameter"
3140 },
3141 {
3142 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)",
3143 "captures": {
3144 "1": {
3145 "name": "storage.modifier.js"
3146 }
3147 }
3148 },
3149 {
3150 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
3151 "captures": {
3152 "1": {
3153 "name": "storage.modifier.js"
3154 },
3155 "2": {
3156 "name": "keyword.operator.rest.js"
3157 },
3158 "3": {
3159 "name": "entity.name.function.js variable.language.this.js"
3160 },
3161 "4": {
3162 "name": "entity.name.function.js"
3163 },
3164 "5": {
3165 "name": "keyword.operator.optional.js"
3166 }
3167 }
3168 },
3169 {
3170 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*[:,]|$)",
3171 "captures": {
3172 "1": {
3173 "name": "storage.modifier.js"
3174 },
3175 "2": {
3176 "name": "keyword.operator.rest.js"
3177 },
3178 "3": {
3179 "name": "variable.parameter.js variable.language.this.js"
3180 },
3181 "4": {
3182 "name": "variable.parameter.js"
3183 },
3184 "5": {
3185 "name": "keyword.operator.optional.js"
3186 }
3187 }
3188 },
3189 {
3190 "include": "#type-annotation"
3191 },
3192 {
3193 "include": "#variable-initializer"
3194 },
3195 {
3196 "name": "punctuation.separator.parameter.js",
3197 "match": ","
3198 },
3199 {
3200 "include": "#identifiers"
3201 },
3202 {
3203 "include": "#expressionPunctuations"
3204 }
3205 ]
3206 },
3207 "paren-expression": {
3208 "begin": "\\(",
3209 "beginCaptures": {
3210 "0": {
3211 "name": "meta.brace.round.js"
3212 }
3213 },
3214 "end": "\\)",
3215 "endCaptures": {
3216 "0": {
3217 "name": "meta.brace.round.js"
3218 }
3219 },
3220 "patterns": [
3221 {
3222 "include": "#expression"
3223 }
3224 ]
3225 },
3226 "cast": {
3227 "patterns": [
3228 {
3229 "include": "#jsx"
3230 }
3231 ]
3232 },
3233 "expression-operators": {
3234 "patterns": [
3235 {
3236 "name": "keyword.control.flow.js",
3237 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(await)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3238 },
3239 {
3240 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?=\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*\\*)",
3241 "beginCaptures": {
3242 "1": {
3243 "name": "keyword.control.flow.js"
3244 }
3245 },
3246 "end": "\\*",
3247 "endCaptures": {
3248 "0": {
3249 "name": "keyword.generator.asterisk.js"
3250 }
3251 },
3252 "patterns": [
3253 {
3254 "include": "#comment"
3255 }
3256 ]
3257 },
3258 {
3259 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s*(\\*))?",
3260 "captures": {
3261 "1": {
3262 "name": "keyword.control.flow.js"
3263 },
3264 "2": {
3265 "name": "keyword.generator.asterisk.js"
3266 }
3267 }
3268 },
3269 {
3270 "name": "keyword.operator.expression.delete.js",
3271 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))delete(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3272 },
3273 {
3274 "name": "keyword.operator.expression.in.js",
3275 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))in(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()"
3276 },
3277 {
3278 "name": "keyword.operator.expression.of.js",
3279 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))of(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()"
3280 },
3281 {
3282 "name": "keyword.operator.expression.instanceof.js",
3283 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3284 },
3285 {
3286 "name": "keyword.operator.new.js",
3287 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3288 },
3289 {
3290 "include": "#typeof-operator"
3291 },
3292 {
3293 "name": "keyword.operator.expression.void.js",
3294 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))void(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3295 },
3296 {
3297 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*($|[;,:})\\]]))",
3298 "captures": {
3299 "1": {
3300 "name": "keyword.control.as.js"
3301 },
3302 "2": {
3303 "name": "storage.modifier.js"
3304 }
3305 }
3306 },
3307 {
3308 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+",
3309 "beginCaptures": {
3310 "1": {
3311 "name": "keyword.control.as.js"
3312 }
3313 },
3314 "end": "(?=^|[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+)|(\\s+\\<))",
3315 "patterns": [
3316 {
3317 "include": "#type"
3318 }
3319 ]
3320 },
3321 {
3322 "name": "keyword.operator.spread.js",
3323 "match": "\\.\\.\\."
3324 },
3325 {
3326 "name": "keyword.operator.assignment.compound.js",
3327 "match": "\\*=|(?<!\\()/=|%=|\\+=|\\-="
3328 },
3329 {
3330 "name": "keyword.operator.assignment.compound.bitwise.js",
3331 "match": "\\&=|\\^=|<<=|>>=|>>>=|\\|="
3332 },
3333 {
3334 "name": "keyword.operator.bitwise.shift.js",
3335 "match": "<<|>>>|>>"
3336 },
3337 {
3338 "name": "keyword.operator.comparison.js",
3339 "match": "===|!==|==|!="
3340 },
3341 {
3342 "name": "keyword.operator.relational.js",
3343 "match": "<=|>=|<>|<|>"
3344 },
3345 {
3346 "match": "(?<=[_$[:alnum:]])(\\!)\\s*(?:(/=)|(?:(/)(?![/*])))",
3347 "captures": {
3348 "1": {
3349 "name": "keyword.operator.logical.js"
3350 },
3351 "2": {
3352 "name": "keyword.operator.assignment.compound.js"
3353 },
3354 "3": {
3355 "name": "keyword.operator.arithmetic.js"
3356 }
3357 }
3358 },
3359 {
3360 "name": "keyword.operator.logical.js",
3361 "match": "\\!|&&|\\|\\||\\?\\?"
3362 },
3363 {
3364 "name": "keyword.operator.bitwise.js",
3365 "match": "\\&|~|\\^|\\|"
3366 },
3367 {
3368 "name": "keyword.operator.assignment.js",
3369 "match": "\\="
3370 },
3371 {
3372 "name": "keyword.operator.decrement.js",
3373 "match": "--"
3374 },
3375 {
3376 "name": "keyword.operator.increment.js",
3377 "match": "\\+\\+"
3378 },
3379 {
3380 "name": "keyword.operator.arithmetic.js",
3381 "match": "%|\\*|/|-|\\+"
3382 },
3383 {
3384 "begin": "(?<=[_$[:alnum:])\\]])\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)+(?:(/=)|(?:(/)(?![/*]))))",
3385 "end": "(?:(/=)|(?:(/)(?!\\*([^\\*]|(\\*[^\\/]))*\\*\\/)))",
3386 "endCaptures": {
3387 "1": {
3388 "name": "keyword.operator.assignment.compound.js"
3389 },
3390 "2": {
3391 "name": "keyword.operator.arithmetic.js"
3392 }
3393 },
3394 "patterns": [
3395 {
3396 "include": "#comment"
3397 }
3398 ]
3399 },
3400 {
3401 "match": "(?<=[_$[:alnum:])\\]])\\s*(?:(/=)|(?:(/)(?![/*])))",
3402 "captures": {
3403 "1": {
3404 "name": "keyword.operator.assignment.compound.js"
3405 },
3406 "2": {
3407 "name": "keyword.operator.arithmetic.js"
3408 }
3409 }
3410 }
3411 ]
3412 },
3413 "typeof-operator": {
3414 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))typeof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3415 "beginCaptures": {
3416 "0": {
3417 "name": "keyword.operator.expression.typeof.js"
3418 }
3419 },
3420 "end": "(?=[,);}\\]=>:&|{\\?]|$|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))",
3421 "patterns": [
3422 {
3423 "include": "#expression"
3424 }
3425 ]
3426 },
3427 "literal": {
3428 "patterns": [
3429 {
3430 "include": "#numeric-literal"
3431 },
3432 {
3433 "include": "#boolean-literal"
3434 },
3435 {
3436 "include": "#null-literal"
3437 },
3438 {
3439 "include": "#undefined-literal"
3440 },
3441 {
3442 "include": "#numericConstant-literal"
3443 },
3444 {
3445 "include": "#array-literal"
3446 },
3447 {
3448 "include": "#this-literal"
3449 },
3450 {
3451 "include": "#super-literal"
3452 }
3453 ]
3454 },
3455 "array-literal": {
3456 "name": "meta.array.literal.js",
3457 "begin": "\\s*(\\[)",
3458 "beginCaptures": {
3459 "1": {
3460 "name": "meta.brace.square.js"
3461 }
3462 },
3463 "end": "\\]",
3464 "endCaptures": {
3465 "0": {
3466 "name": "meta.brace.square.js"
3467 }
3468 },
3469 "patterns": [
3470 {
3471 "include": "#expression"
3472 },
3473 {
3474 "include": "#punctuation-comma"
3475 }
3476 ]
3477 },
3478 "numeric-literal": {
3479 "patterns": [
3480 {
3481 "name": "constant.numeric.hex.js",
3482 "match": "\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$)",
3483 "captures": {
3484 "1": {
3485 "name": "storage.type.numeric.bigint.js"
3486 }
3487 }
3488 },
3489 {
3490 "name": "constant.numeric.binary.js",
3491 "match": "\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$)",
3492 "captures": {
3493 "1": {
3494 "name": "storage.type.numeric.bigint.js"
3495 }
3496 }
3497 },
3498 {
3499 "name": "constant.numeric.octal.js",
3500 "match": "\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$)",
3501 "captures": {
3502 "1": {
3503 "name": "storage.type.numeric.bigint.js"
3504 }
3505 }
3506 },
3507 {
3508 "match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$)",
3509 "captures": {
3510 "0": {
3511 "name": "constant.numeric.decimal.js"
3512 },
3513 "1": {
3514 "name": "meta.delimiter.decimal.period.js"
3515 },
3516 "2": {
3517 "name": "storage.type.numeric.bigint.js"
3518 },
3519 "3": {
3520 "name": "meta.delimiter.decimal.period.js"
3521 },
3522 "4": {
3523 "name": "storage.type.numeric.bigint.js"
3524 },
3525 "5": {
3526 "name": "meta.delimiter.decimal.period.js"
3527 },
3528 "6": {
3529 "name": "storage.type.numeric.bigint.js"
3530 },
3531 "7": {
3532 "name": "storage.type.numeric.bigint.js"
3533 },
3534 "8": {
3535 "name": "meta.delimiter.decimal.period.js"
3536 },
3537 "9": {
3538 "name": "storage.type.numeric.bigint.js"
3539 },
3540 "10": {
3541 "name": "meta.delimiter.decimal.period.js"
3542 },
3543 "11": {
3544 "name": "storage.type.numeric.bigint.js"
3545 },
3546 "12": {
3547 "name": "meta.delimiter.decimal.period.js"
3548 },
3549 "13": {
3550 "name": "storage.type.numeric.bigint.js"
3551 },
3552 "14": {
3553 "name": "storage.type.numeric.bigint.js"
3554 }
3555 }
3556 }
3557 ]
3558 },
3559 "boolean-literal": {
3560 "patterns": [
3561 {
3562 "name": "constant.language.boolean.true.js",
3563 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))true(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3564 },
3565 {
3566 "name": "constant.language.boolean.false.js",
3567 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))false(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3568 }
3569 ]
3570 },
3571 "null-literal": {
3572 "name": "constant.language.null.js",
3573 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))null(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3574 },
3575 "this-literal": {
3576 "name": "variable.language.this.js",
3577 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))this\\b(?!\\$)"
3578 },
3579 "super-literal": {
3580 "name": "variable.language.super.js",
3581 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))super\\b(?!\\$)"
3582 },
3583 "undefined-literal": {
3584 "name": "constant.language.undefined.js",
3585 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))undefined(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3586 },
3587 "numericConstant-literal": {
3588 "patterns": [
3589 {
3590 "name": "constant.language.nan.js",
3591 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))NaN(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3592 },
3593 {
3594 "name": "constant.language.infinity.js",
3595 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Infinity(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3596 }
3597 ]
3598 },
3599 "support-objects": {
3600 "patterns": [
3601 {
3602 "name": "variable.language.arguments.js",
3603 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(arguments)\\b(?!\\$)"
3604 },
3605 {
3606 "name": "support.class.promise.js",
3607 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(Promise)\\b(?!\\$)"
3608 },
3609 {
3610 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(import)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(meta)\\b(?!\\$)",
3611 "captures": {
3612 "1": {
3613 "name": "keyword.control.import.js"
3614 },
3615 "2": {
3616 "name": "punctuation.accessor.js"
3617 },
3618 "3": {
3619 "name": "punctuation.accessor.optional.js"
3620 },
3621 "4": {
3622 "name": "support.variable.property.importmeta.js"
3623 }
3624 }
3625 },
3626 {
3627 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(target)\\b(?!\\$)",
3628 "captures": {
3629 "1": {
3630 "name": "keyword.operator.new.js"
3631 },
3632 "2": {
3633 "name": "punctuation.accessor.js"
3634 },
3635 "3": {
3636 "name": "punctuation.accessor.optional.js"
3637 },
3638 "4": {
3639 "name": "support.variable.property.target.js"
3640 }
3641 }
3642 },
3643 {
3644 "match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s* (?:\n (?:(constructor|length|prototype|__proto__)\\b(?!\\$|\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\\())\n |\n (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\b(?!\\$)))",
3645 "captures": {
3646 "1": {
3647 "name": "punctuation.accessor.js"
3648 },
3649 "2": {
3650 "name": "punctuation.accessor.optional.js"
3651 },
3652 "3": {
3653 "name": "support.variable.property.js"
3654 },
3655 "4": {
3656 "name": "support.constant.js"
3657 }
3658 }
3659 },
3660 {
3661 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(exports)|(module)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)",
3662 "captures": {
3663 "1": {
3664 "name": "support.type.object.module.js"
3665 },
3666 "2": {
3667 "name": "support.type.object.module.js"
3668 },
3669 "3": {
3670 "name": "punctuation.accessor.js"
3671 },
3672 "4": {
3673 "name": "punctuation.accessor.optional.js"
3674 },
3675 "5": {
3676 "name": "support.type.object.module.js"
3677 }
3678 }
3679 }
3680 ]
3681 },
3682 "identifiers": {
3683 "patterns": [
3684 {
3685 "include": "#object-identifiers"
3686 },
3687 {
3688 "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))",
3689 "captures": {
3690 "1": {
3691 "name": "punctuation.accessor.js"
3692 },
3693 "2": {
3694 "name": "punctuation.accessor.optional.js"
3695 },
3696 "3": {
3697 "name": "entity.name.function.js"
3698 }
3699 }
3700 },
3701 {
3702 "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])",
3703 "captures": {
3704 "1": {
3705 "name": "punctuation.accessor.js"
3706 },
3707 "2": {
3708 "name": "punctuation.accessor.optional.js"
3709 },
3710 "3": {
3711 "name": "variable.other.constant.property.js"
3712 }
3713 }
3714 },
3715 {
3716 "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*)",
3717 "captures": {
3718 "1": {
3719 "name": "punctuation.accessor.js"
3720 },
3721 "2": {
3722 "name": "punctuation.accessor.optional.js"
3723 },
3724 "3": {
3725 "name": "variable.other.property.js"
3726 }
3727 }
3728 },
3729 {
3730 "name": "variable.other.constant.js",
3731 "match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
3732 },
3733 {
3734 "name": "variable.other.readwrite.js",
3735 "match": "[_$[:alpha:]][_$[:alnum:]]*"
3736 }
3737 ]
3738 },
3739 "object-identifiers": {
3740 "patterns": [
3741 {
3742 "name": "support.class.js",
3743 "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\??\\.\\s*prototype\\b(?!\\$))"
3744 },
3745 {
3746 "match": "(?x)(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(?:\n (\\#?[[:upper:]][_$[:digit:][:upper:]]*) |\n (\\#?[_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)",
3747 "captures": {
3748 "1": {
3749 "name": "punctuation.accessor.js"
3750 },
3751 "2": {
3752 "name": "punctuation.accessor.optional.js"
3753 },
3754 "3": {
3755 "name": "variable.other.constant.object.property.js"
3756 },
3757 "4": {
3758 "name": "variable.other.object.property.js"
3759 }
3760 }
3761 },
3762 {
3763 "match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)",
3764 "captures": {
3765 "1": {
3766 "name": "variable.other.constant.object.js"
3767 },
3768 "2": {
3769 "name": "variable.other.object.js"
3770 }
3771 }
3772 }
3773 ]
3774 },
3775 "type-annotation": {
3776 "patterns": [
3777 {
3778 "name": "meta.type.annotation.js",
3779 "begin": "(:)(?=\\s*\\S)",
3780 "beginCaptures": {
3781 "1": {
3782 "name": "keyword.operator.type.annotation.js"
3783 }
3784 },
3785 "end": "(?<![:|&])((?=$|^|[,);\\}\\]]|//)|(?==[^>])|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))",
3786 "patterns": [
3787 {
3788 "include": "#type"
3789 }
3790 ]
3791 },
3792 {
3793 "name": "meta.type.annotation.js",
3794 "begin": "(:)",
3795 "beginCaptures": {
3796 "1": {
3797 "name": "keyword.operator.type.annotation.js"
3798 }
3799 },
3800 "end": "(?<![:|&])((?=[,);\\}\\]]|//)|(?==[^>])|(?=^\\s*$)|((?<=\\S)(?=\\s*$))|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))",
3801 "patterns": [
3802 {
3803 "include": "#type"
3804 }
3805 ]
3806 }
3807 ]
3808 },
3809 "parameter-type-annotation": {
3810 "patterns": [
3811 {
3812 "name": "meta.type.annotation.js",
3813 "begin": "(:)",
3814 "beginCaptures": {
3815 "1": {
3816 "name": "keyword.operator.type.annotation.js"
3817 }
3818 },
3819 "end": "(?=[,)])|(?==[^>])",
3820 "patterns": [
3821 {
3822 "include": "#type"
3823 }
3824 ]
3825 }
3826 ]
3827 },
3828 "return-type": {
3829 "patterns": [
3830 {
3831 "name": "meta.return.type.js",
3832 "begin": "(?<=\\))\\s*(:)(?=\\s*\\S)",
3833 "beginCaptures": {
3834 "1": {
3835 "name": "keyword.operator.type.annotation.js"
3836 }
3837 },
3838 "end": "(?<![:|&])(?=$|^|[{};,]|//)",
3839 "patterns": [
3840 {
3841 "include": "#return-type-core"
3842 }
3843 ]
3844 },
3845 {
3846 "name": "meta.return.type.js",
3847 "begin": "(?<=\\))\\s*(:)",
3848 "beginCaptures": {
3849 "1": {
3850 "name": "keyword.operator.type.annotation.js"
3851 }
3852 },
3853 "end": "(?<![:|&])((?=[{};,]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))",
3854 "patterns": [
3855 {
3856 "include": "#return-type-core"
3857 }
3858 ]
3859 }
3860 ]
3861 },
3862 "return-type-core": {
3863 "patterns": [
3864 {
3865 "include": "#comment"
3866 },
3867 {
3868 "begin": "(?<=[:|&])(?=\\s*\\{)",
3869 "end": "(?<=\\})",
3870 "patterns": [
3871 {
3872 "include": "#type-object"
3873 }
3874 ]
3875 },
3876 {
3877 "include": "#type-predicate-operator"
3878 },
3879 {
3880 "include": "#type"
3881 }
3882 ]
3883 },
3884 "arrow-return-type": {
3885 "name": "meta.return.type.arrow.js",
3886 "begin": "(?<=\\))\\s*(:)",
3887 "beginCaptures": {
3888 "1": {
3889 "name": "keyword.operator.type.annotation.js"
3890 }
3891 },
3892 "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
3893 "patterns": [
3894 {
3895 "include": "#arrow-return-type-body"
3896 }
3897 ]
3898 },
3899 "possibly-arrow-return-type": {
3900 "begin": "(?<=\\)|^)\\s*(:)(?=\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*=>)",
3901 "beginCaptures": {
3902 "1": {
3903 "name": "meta.arrow.js meta.return.type.arrow.js keyword.operator.type.annotation.js"
3904 }
3905 },
3906 "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
3907 "contentName": "meta.arrow.js meta.return.type.arrow.js",
3908 "patterns": [
3909 {
3910 "include": "#arrow-return-type-body"
3911 }
3912 ]
3913 },
3914 "arrow-return-type-body": {
3915 "patterns": [
3916 {
3917 "begin": "(?<=[:])(?=\\s*\\{)",
3918 "end": "(?<=\\})",
3919 "patterns": [
3920 {
3921 "include": "#type-object"
3922 }
3923 ]
3924 },
3925 {
3926 "include": "#type-predicate-operator"
3927 },
3928 {
3929 "include": "#type"
3930 }
3931 ]
3932 },
3933 "type-parameters": {
3934 "name": "meta.type.parameters.js",
3935 "begin": "(<)",
3936 "beginCaptures": {
3937 "1": {
3938 "name": "punctuation.definition.typeparameters.begin.js"
3939 }
3940 },
3941 "end": "(>)",
3942 "endCaptures": {
3943 "1": {
3944 "name": "punctuation.definition.typeparameters.end.js"
3945 }
3946 },
3947 "patterns": [
3948 {
3949 "include": "#comment"
3950 },
3951 {
3952 "name": "storage.modifier.js",
3953 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends|in|out)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3954 },
3955 {
3956 "include": "#type"
3957 },
3958 {
3959 "include": "#punctuation-comma"
3960 },
3961 {
3962 "name": "keyword.operator.assignment.js",
3963 "match": "(=)(?!>)"
3964 }
3965 ]
3966 },
3967 "type-arguments": {
3968 "name": "meta.type.parameters.js",
3969 "begin": "\\<",
3970 "beginCaptures": {
3971 "0": {
3972 "name": "punctuation.definition.typeparameters.begin.js"
3973 }
3974 },
3975 "end": "\\>",
3976 "endCaptures": {
3977 "0": {
3978 "name": "punctuation.definition.typeparameters.end.js"
3979 }
3980 },
3981 "patterns": [
3982 {
3983 "include": "#type-arguments-body"
3984 }
3985 ]
3986 },
3987 "type-arguments-body": {
3988 "patterns": [
3989 {
3990 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(_)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3991 "captures": {
3992 "0": {
3993 "name": "keyword.operator.type.js"
3994 }
3995 }
3996 },
3997 {
3998 "include": "#type"
3999 },
4000 {
4001 "include": "#punctuation-comma"
4002 }
4003 ]
4004 },
4005 "type": {
4006 "patterns": [
4007 {
4008 "include": "#comment"
4009 },
4010 {
4011 "include": "#type-string"
4012 },
4013 {
4014 "include": "#numeric-literal"
4015 },
4016 {
4017 "include": "#type-primitive"
4018 },
4019 {
4020 "include": "#type-builtin-literals"
4021 },
4022 {
4023 "include": "#type-parameters"
4024 },
4025 {
4026 "include": "#type-tuple"
4027 },
4028 {
4029 "include": "#type-object"
4030 },
4031 {
4032 "include": "#type-operators"
4033 },
4034 {
4035 "include": "#type-conditional"
4036 },
4037 {
4038 "include": "#type-fn-type-parameters"
4039 },
4040 {
4041 "include": "#type-paren-or-function-parameters"
4042 },
4043 {
4044 "include": "#type-function-return-type"
4045 },
4046 {
4047 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
4048 "captures": {
4049 "1": {
4050 "name": "storage.modifier.js"
4051 }
4052 }
4053 },
4054 {
4055 "include": "#type-name"
4056 }
4057 ]
4058 },
4059 "type-primitive": {
4060 "name": "support.type.primitive.js",
4061 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(string|number|bigint|boolean|symbol|any|void|never|unknown)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4062 },
4063 "type-builtin-literals": {
4064 "name": "support.type.builtin.js",
4065 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(this|true|false|undefined|null|object)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4066 },
4067 "type-tuple": {
4068 "name": "meta.type.tuple.js",
4069 "begin": "\\[",
4070 "beginCaptures": {
4071 "0": {
4072 "name": "meta.brace.square.js"
4073 }
4074 },
4075 "end": "\\]",
4076 "endCaptures": {
4077 "0": {
4078 "name": "meta.brace.square.js"
4079 }
4080 },
4081 "patterns": [
4082 {
4083 "name": "keyword.operator.rest.js",
4084 "match": "\\.\\.\\."
4085 },
4086 {
4087 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?)?\\s*(:)",
4088 "captures": {
4089 "1": {
4090 "name": "entity.name.label.js"
4091 },
4092 "2": {
4093 "name": "keyword.operator.optional.js"
4094 },
4095 "3": {
4096 "name": "punctuation.separator.label.js"
4097 }
4098 }
4099 },
4100 {
4101 "include": "#type"
4102 },
4103 {
4104 "include": "#punctuation-comma"
4105 }
4106 ]
4107 },
4108 "type-object": {
4109 "name": "meta.object.type.js",
4110 "begin": "\\{",
4111 "beginCaptures": {
4112 "0": {
4113 "name": "punctuation.definition.block.js"
4114 }
4115 },
4116 "end": "\\}",
4117 "endCaptures": {
4118 "0": {
4119 "name": "punctuation.definition.block.js"
4120 }
4121 },
4122 "patterns": [
4123 {
4124 "include": "#comment"
4125 },
4126 {
4127 "include": "#method-declaration"
4128 },
4129 {
4130 "include": "#indexer-declaration"
4131 },
4132 {
4133 "include": "#indexer-mapped-type-declaration"
4134 },
4135 {
4136 "include": "#field-declaration"
4137 },
4138 {
4139 "include": "#type-annotation"
4140 },
4141 {
4142 "begin": "\\.\\.\\.",
4143 "beginCaptures": {
4144 "0": {
4145 "name": "keyword.operator.spread.js"
4146 }
4147 },
4148 "end": "(?=\\}|;|,|$)|(?<=\\})",
4149 "patterns": [
4150 {
4151 "include": "#type"
4152 }
4153 ]
4154 },
4155 {
4156 "include": "#punctuation-comma"
4157 },
4158 {
4159 "include": "#punctuation-semicolon"
4160 },
4161 {
4162 "include": "#type"
4163 }
4164 ]
4165 },
4166 "type-conditional": {
4167 "patterns": [
4168 {
4169 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends)\\s+",
4170 "beginCaptures": {
4171 "1": {
4172 "name": "storage.modifier.js"
4173 }
4174 },
4175 "end": "(?<=:)",
4176 "patterns": [
4177 {
4178 "begin": "\\?",
4179 "beginCaptures": {
4180 "0": {
4181 "name": "keyword.operator.ternary.js"
4182 }
4183 },
4184 "end": ":",
4185 "endCaptures": {
4186 "0": {
4187 "name": "keyword.operator.ternary.js"
4188 }
4189 },
4190 "patterns": [
4191 {
4192 "include": "#type"
4193 }
4194 ]
4195 },
4196 {
4197 "include": "#type"
4198 }
4199 ]
4200 }
4201 ]
4202 },
4203 "type-paren-or-function-parameters": {
4204 "name": "meta.type.paren.cover.js",
4205 "begin": "\\(",
4206 "beginCaptures": {
4207 "0": {
4208 "name": "meta.brace.round.js"
4209 }
4210 },
4211 "end": "\\)",
4212 "endCaptures": {
4213 "0": {
4214 "name": "meta.brace.round.js"
4215 }
4216 },
4217 "patterns": [
4218 {
4219 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=\\s*(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))))",
4220 "captures": {
4221 "1": {
4222 "name": "storage.modifier.js"
4223 },
4224 "2": {
4225 "name": "keyword.operator.rest.js"
4226 },
4227 "3": {
4228 "name": "entity.name.function.js variable.language.this.js"
4229 },
4230 "4": {
4231 "name": "entity.name.function.js"
4232 },
4233 "5": {
4234 "name": "keyword.operator.optional.js"
4235 }
4236 }
4237 },
4238 {
4239 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=:)",
4240 "captures": {
4241 "1": {
4242 "name": "storage.modifier.js"
4243 },
4244 "2": {
4245 "name": "keyword.operator.rest.js"
4246 },
4247 "3": {
4248 "name": "variable.parameter.js variable.language.this.js"
4249 },
4250 "4": {
4251 "name": "variable.parameter.js"
4252 },
4253 "5": {
4254 "name": "keyword.operator.optional.js"
4255 }
4256 }
4257 },
4258 {
4259 "include": "#type-annotation"
4260 },
4261 {
4262 "name": "punctuation.separator.parameter.js",
4263 "match": ","
4264 },
4265 {
4266 "include": "#type"
4267 }
4268 ]
4269 },
4270 "type-fn-type-parameters": {
4271 "patterns": [
4272 {
4273 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b(?=\\s*\\<)",
4274 "beginCaptures": {
4275 "1": {
4276 "name": "meta.type.constructor.js storage.modifier.js"
4277 },
4278 "2": {
4279 "name": "meta.type.constructor.js keyword.control.new.js"
4280 }
4281 },
4282 "end": "(?<=>)",
4283 "patterns": [
4284 {
4285 "include": "#comment"
4286 },
4287 {
4288 "include": "#type-parameters"
4289 }
4290 ]
4291 },
4292 {
4293 "name": "meta.type.constructor.js",
4294 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b\\s*(?=\\()",
4295 "beginCaptures": {
4296 "1": {
4297 "name": "storage.modifier.js"
4298 },
4299 "2": {
4300 "name": "keyword.control.new.js"
4301 }
4302 },
4303 "end": "(?<=\\))",
4304 "patterns": [
4305 {
4306 "include": "#function-parameters"
4307 }
4308 ]
4309 },
4310 {
4311 "name": "meta.type.function.js",
4312 "begin": "(?x)(\n (?=\n [(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )\n )\n)",
4313 "end": "(?<=\\))",
4314 "patterns": [
4315 {
4316 "include": "#function-parameters"
4317 }
4318 ]
4319 }
4320 ]
4321 },
4322 "type-function-return-type": {
4323 "patterns": [
4324 {
4325 "name": "meta.type.function.return.js",
4326 "begin": "(=>)(?=\\s*\\S)",
4327 "beginCaptures": {
4328 "1": {
4329 "name": "storage.type.function.arrow.js"
4330 }
4331 },
4332 "end": "(?<!=>)(?<![|&])(?=[,\\]\\)\\{\\}=;>:\\?]|//|$)",
4333 "patterns": [
4334 {
4335 "include": "#type-function-return-type-core"
4336 }
4337 ]
4338 },
4339 {
4340 "name": "meta.type.function.return.js",
4341 "begin": "=>",
4342 "beginCaptures": {
4343 "0": {
4344 "name": "storage.type.function.arrow.js"
4345 }
4346 },
4347 "end": "(?<!=>)(?<![|&])((?=[,\\]\\)\\{\\}=;:\\?>]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))",
4348 "patterns": [
4349 {
4350 "include": "#type-function-return-type-core"
4351 }
4352 ]
4353 }
4354 ]
4355 },
4356 "type-function-return-type-core": {
4357 "patterns": [
4358 {
4359 "include": "#comment"
4360 },
4361 {
4362 "begin": "(?<==>)(?=\\s*\\{)",
4363 "end": "(?<=\\})",
4364 "patterns": [
4365 {
4366 "include": "#type-object"
4367 }
4368 ]
4369 },
4370 {
4371 "include": "#type-predicate-operator"
4372 },
4373 {
4374 "include": "#type"
4375 }
4376 ]
4377 },
4378 "type-operators": {
4379 "patterns": [
4380 {
4381 "include": "#typeof-operator"
4382 },
4383 {
4384 "include": "#type-infer"
4385 },
4386 {
4387 "begin": "([&|])(?=\\s*\\{)",
4388 "beginCaptures": {
4389 "0": {
4390 "name": "keyword.operator.type.js"
4391 }
4392 },
4393 "end": "(?<=\\})",
4394 "patterns": [
4395 {
4396 "include": "#type-object"
4397 }
4398 ]
4399 },
4400 {
4401 "begin": "[&|]",
4402 "beginCaptures": {
4403 "0": {
4404 "name": "keyword.operator.type.js"
4405 }
4406 },
4407 "end": "(?=\\S)"
4408 },
4409 {
4410 "name": "keyword.operator.expression.keyof.js",
4411 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))keyof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4412 },
4413 {
4414 "name": "keyword.operator.ternary.js",
4415 "match": "(\\?|\\:)"
4416 },
4417 {
4418 "name": "keyword.operator.expression.import.js",
4419 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*\\()"
4420 }
4421 ]
4422 },
4423 "type-infer": {
4424 "patterns": [
4425 {
4426 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(infer)\\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s+(extends)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))?",
4427 "name": "meta.type.infer.js",
4428 "captures": {
4429 "1": {
4430 "name": "keyword.operator.expression.infer.js"
4431 },
4432 "2": {
4433 "name": "entity.name.type.js"
4434 },
4435 "3": {
4436 "name": "keyword.operator.expression.extends.js"
4437 }
4438 }
4439 }
4440 ]
4441 },
4442 "type-predicate-operator": {
4443 "patterns": [
4444 {
4445 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(asserts)\\s+)?(?!asserts)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s(is)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4446 "captures": {
4447 "1": {
4448 "name": "keyword.operator.type.asserts.js"
4449 },
4450 "2": {
4451 "name": "variable.parameter.js variable.language.this.js"
4452 },
4453 "3": {
4454 "name": "variable.parameter.js"
4455 },
4456 "4": {
4457 "name": "keyword.operator.expression.is.js"
4458 }
4459 }
4460 },
4461 {
4462 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(asserts)\\s+(?!is)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4463 "captures": {
4464 "1": {
4465 "name": "keyword.operator.type.asserts.js"
4466 },
4467 "2": {
4468 "name": "variable.parameter.js variable.language.this.js"
4469 },
4470 "3": {
4471 "name": "variable.parameter.js"
4472 }
4473 }
4474 },
4475 {
4476 "name": "keyword.operator.type.asserts.js",
4477 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))asserts(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4478 },
4479 {
4480 "name": "keyword.operator.expression.is.js",
4481 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))is(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4482 }
4483 ]
4484 },
4485 "type-name": {
4486 "patterns": [
4487 {
4488 "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(<)",
4489 "captures": {
4490 "1": {
4491 "name": "entity.name.type.module.js"
4492 },
4493 "2": {
4494 "name": "punctuation.accessor.js"
4495 },
4496 "3": {
4497 "name": "punctuation.accessor.optional.js"
4498 },
4499 "4": {
4500 "name": "meta.type.parameters.js punctuation.definition.typeparameters.begin.js"
4501 }
4502 },
4503 "end": "(>)",
4504 "endCaptures": {
4505 "1": {
4506 "name": "meta.type.parameters.js punctuation.definition.typeparameters.end.js"
4507 }
4508 },
4509 "contentName": "meta.type.parameters.js",
4510 "patterns": [
4511 {
4512 "include": "#type-arguments-body"
4513 }
4514 ]
4515 },
4516 {
4517 "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(<)",
4518 "beginCaptures": {
4519 "1": {
4520 "name": "entity.name.type.js"
4521 },
4522 "2": {
4523 "name": "meta.type.parameters.js punctuation.definition.typeparameters.begin.js"
4524 }
4525 },
4526 "end": "(>)",
4527 "endCaptures": {
4528 "1": {
4529 "name": "meta.type.parameters.js punctuation.definition.typeparameters.end.js"
4530 }
4531 },
4532 "contentName": "meta.type.parameters.js",
4533 "patterns": [
4534 {
4535 "include": "#type-arguments-body"
4536 }
4537 ]
4538 },
4539 {
4540 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))",
4541 "captures": {
4542 "1": {
4543 "name": "entity.name.type.module.js"
4544 },
4545 "2": {
4546 "name": "punctuation.accessor.js"
4547 },
4548 "3": {
4549 "name": "punctuation.accessor.optional.js"
4550 }
4551 }
4552 },
4553 {
4554 "name": "entity.name.type.js",
4555 "match": "[_$[:alpha:]][_$[:alnum:]]*"
4556 }
4557 ]
4558 },
4559 "punctuation-comma": {
4560 "name": "punctuation.separator.comma.js",
4561 "match": ","
4562 },
4563 "punctuation-semicolon": {
4564 "name": "punctuation.terminator.statement.js",
4565 "match": ";"
4566 },
4567 "punctuation-accessor": {
4568 "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))",
4569 "captures": {
4570 "1": {
4571 "name": "punctuation.accessor.js"
4572 },
4573 "2": {
4574 "name": "punctuation.accessor.optional.js"
4575 }
4576 }
4577 },
4578 "string": {
4579 "patterns": [
4580 {
4581 "include": "#qstring-single"
4582 },
4583 {
4584 "include": "#qstring-double"
4585 },
4586 {
4587 "include": "#template"
4588 }
4589 ]
4590 },
4591 "qstring-double": {
4592 "name": "string.quoted.double.js",
4593 "begin": "\"",
4594 "beginCaptures": {
4595 "0": {
4596 "name": "punctuation.definition.string.begin.js"
4597 }
4598 },
4599 "end": "(\")|((?:[^\\\\\\n])$)",
4600 "endCaptures": {
4601 "1": {
4602 "name": "punctuation.definition.string.end.js"
4603 },
4604 "2": {
4605 "name": "invalid.illegal.newline.js"
4606 }
4607 },
4608 "patterns": [
4609 {
4610 "include": "#string-character-escape"
4611 }
4612 ]
4613 },
4614 "qstring-single": {
4615 "name": "string.quoted.single.js",
4616 "begin": "'",
4617 "beginCaptures": {
4618 "0": {
4619 "name": "punctuation.definition.string.begin.js"
4620 }
4621 },
4622 "end": "(\\')|((?:[^\\\\\\n])$)",
4623 "endCaptures": {
4624 "1": {
4625 "name": "punctuation.definition.string.end.js"
4626 },
4627 "2": {
4628 "name": "invalid.illegal.newline.js"
4629 }
4630 },
4631 "patterns": [
4632 {
4633 "include": "#string-character-escape"
4634 }
4635 ]
4636 },
4637 "string-character-escape": {
4638 "name": "constant.character.escape.js",
4639 "match": "\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|u\\{[0-9A-Fa-f]+\\}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)"
4640 },
4641 "template": {
4642 "patterns": [
4643 {
4644 "include": "#template-call"
4645 },
4646 {
4647 "name": "string.template.js",
4648 "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)",
4649 "beginCaptures": {
4650 "1": {
4651 "name": "entity.name.function.tagged-template.js"
4652 },
4653 "2": {
4654 "name": "punctuation.definition.string.template.begin.js"
4655 }
4656 },
4657 "end": "`",
4658 "endCaptures": {
4659 "0": {
4660 "name": "punctuation.definition.string.template.end.js"
4661 }
4662 },
4663 "patterns": [
4664 {
4665 "include": "#template-substitution-element"
4666 },
4667 {
4668 "include": "#string-character-escape"
4669 }
4670 ]
4671 }
4672 ]
4673 },
4674 "template-call": {
4675 "patterns": [
4676 {
4677 "name": "string.template.js",
4678 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?`)",
4679 "end": "(?=`)",
4680 "patterns": [
4681 {
4682 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))",
4683 "end": "(?=(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?`)",
4684 "patterns": [
4685 {
4686 "include": "#support-function-call-identifiers"
4687 },
4688 {
4689 "name": "entity.name.function.tagged-template.js",
4690 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
4691 }
4692 ]
4693 },
4694 {
4695 "include": "#type-arguments"
4696 }
4697 ]
4698 },
4699 {
4700 "name": "string.template.js",
4701 "begin": "([_$[:alpha:]][_$[:alnum:]]*)?\\s*(?=(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)`)",
4702 "beginCaptures": {
4703 "1": {
4704 "name": "entity.name.function.tagged-template.js"
4705 }
4706 },
4707 "end": "(?=`)",
4708 "patterns": [
4709 {
4710 "include": "#type-arguments"
4711 }
4712 ]
4713 }
4714 ]
4715 },
4716 "template-substitution-element": {
4717 "name": "meta.template.expression.js",
4718 "begin": "\\$\\{",
4719 "beginCaptures": {
4720 "0": {
4721 "name": "punctuation.definition.template-expression.begin.js"
4722 }
4723 },
4724 "end": "\\}",
4725 "endCaptures": {
4726 "0": {
4727 "name": "punctuation.definition.template-expression.end.js"
4728 }
4729 },
4730 "patterns": [
4731 {
4732 "include": "#expression"
4733 }
4734 ],
4735 "contentName": "meta.embedded.line.js"
4736 },
4737 "type-string": {
4738 "patterns": [
4739 {
4740 "include": "#qstring-single"
4741 },
4742 {
4743 "include": "#qstring-double"
4744 },
4745 {
4746 "include": "#template-type"
4747 }
4748 ]
4749 },
4750 "template-type": {
4751 "patterns": [
4752 {
4753 "include": "#template-call"
4754 },
4755 {
4756 "name": "string.template.js",
4757 "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)",
4758 "beginCaptures": {
4759 "1": {
4760 "name": "entity.name.function.tagged-template.js"
4761 },
4762 "2": {
4763 "name": "punctuation.definition.string.template.begin.js"
4764 }
4765 },
4766 "end": "`",
4767 "endCaptures": {
4768 "0": {
4769 "name": "punctuation.definition.string.template.end.js"
4770 }
4771 },
4772 "patterns": [
4773 {
4774 "include": "#template-type-substitution-element"
4775 },
4776 {
4777 "include": "#string-character-escape"
4778 }
4779 ]
4780 }
4781 ]
4782 },
4783 "template-type-substitution-element": {
4784 "name": "meta.template.expression.js",
4785 "begin": "\\$\\{",
4786 "beginCaptures": {
4787 "0": {
4788 "name": "punctuation.definition.template-expression.begin.js"
4789 }
4790 },
4791 "end": "\\}",
4792 "endCaptures": {
4793 "0": {
4794 "name": "punctuation.definition.template-expression.end.js"
4795 }
4796 },
4797 "patterns": [
4798 {
4799 "include": "#type"
4800 }
4801 ],
4802 "contentName": "meta.embedded.line.js"
4803 },
4804 "regex": {
4805 "patterns": [
4806 {
4807 "name": "string.regexp.js",
4808 "begin": "(?<!\\+\\+|--|})(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
4809 "beginCaptures": {
4810 "1": {
4811 "name": "punctuation.definition.string.begin.js"
4812 }
4813 },
4814 "end": "(/)([dgimsuy]*)",
4815 "endCaptures": {
4816 "1": {
4817 "name": "punctuation.definition.string.end.js"
4818 },
4819 "2": {
4820 "name": "keyword.other.js"
4821 }
4822 },
4823 "patterns": [
4824 {
4825 "include": "#regexp"
4826 }
4827 ]
4828 },
4829 {
4830 "name": "string.regexp.js",
4831 "begin": "((?<![_$[:alnum:])\\]]|\\+\\+|--|}|\\*\\/)|((?<=^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case))\\s*)\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
4832 "beginCaptures": {
4833 "0": {
4834 "name": "punctuation.definition.string.begin.js"
4835 }
4836 },
4837 "end": "(/)([dgimsuy]*)",
4838 "endCaptures": {
4839 "1": {
4840 "name": "punctuation.definition.string.end.js"
4841 },
4842 "2": {
4843 "name": "keyword.other.js"
4844 }
4845 },
4846 "patterns": [
4847 {
4848 "include": "#regexp"
4849 }
4850 ]
4851 }
4852 ]
4853 },
4854 "regexp": {
4855 "patterns": [
4856 {
4857 "name": "keyword.control.anchor.regexp",
4858 "match": "\\\\[bB]|\\^|\\$"
4859 },
4860 {
4861 "match": "\\\\[1-9]\\d*|\\\\k<([a-zA-Z_$][\\w$]*)>",
4862 "captures": {
4863 "0": {
4864 "name": "keyword.other.back-reference.regexp"
4865 },
4866 "1": {
4867 "name": "variable.other.regexp"
4868 }
4869 }
4870 },
4871 {
4872 "name": "keyword.operator.quantifier.regexp",
4873 "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??"
4874 },
4875 {
4876 "name": "keyword.operator.or.regexp",
4877 "match": "\\|"
4878 },
4879 {
4880 "name": "meta.group.assertion.regexp",
4881 "begin": "(\\()((\\?=)|(\\?!)|(\\?<=)|(\\?<!))",
4882 "beginCaptures": {
4883 "1": {
4884 "name": "punctuation.definition.group.regexp"
4885 },
4886 "2": {
4887 "name": "punctuation.definition.group.assertion.regexp"
4888 },
4889 "3": {
4890 "name": "meta.assertion.look-ahead.regexp"
4891 },
4892 "4": {
4893 "name": "meta.assertion.negative-look-ahead.regexp"
4894 },
4895 "5": {
4896 "name": "meta.assertion.look-behind.regexp"
4897 },
4898 "6": {
4899 "name": "meta.assertion.negative-look-behind.regexp"
4900 }
4901 },
4902 "end": "(\\))",
4903 "endCaptures": {
4904 "1": {
4905 "name": "punctuation.definition.group.regexp"
4906 }
4907 },
4908 "patterns": [
4909 {
4910 "include": "#regexp"
4911 }
4912 ]
4913 },
4914 {
4915 "name": "meta.group.regexp",
4916 "begin": "\\((?:(\\?:)|(?:\\?<([a-zA-Z_$][\\w$]*)>))?",
4917 "beginCaptures": {
4918 "0": {
4919 "name": "punctuation.definition.group.regexp"
4920 },
4921 "1": {
4922 "name": "punctuation.definition.group.no-capture.regexp"
4923 },
4924 "2": {
4925 "name": "variable.other.regexp"
4926 }
4927 },
4928 "end": "\\)",
4929 "endCaptures": {
4930 "0": {
4931 "name": "punctuation.definition.group.regexp"
4932 }
4933 },
4934 "patterns": [
4935 {
4936 "include": "#regexp"
4937 }
4938 ]
4939 },
4940 {
4941 "name": "constant.other.character-class.set.regexp",
4942 "begin": "(\\[)(\\^)?",
4943 "beginCaptures": {
4944 "1": {
4945 "name": "punctuation.definition.character-class.regexp"
4946 },
4947 "2": {
4948 "name": "keyword.operator.negation.regexp"
4949 }
4950 },
4951 "end": "(\\])",
4952 "endCaptures": {
4953 "1": {
4954 "name": "punctuation.definition.character-class.regexp"
4955 }
4956 },
4957 "patterns": [
4958 {
4959 "name": "constant.other.character-class.range.regexp",
4960 "match": "(?:.|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))",
4961 "captures": {
4962 "1": {
4963 "name": "constant.character.numeric.regexp"
4964 },
4965 "2": {
4966 "name": "constant.character.control.regexp"
4967 },
4968 "3": {
4969 "name": "constant.character.escape.backslash.regexp"
4970 },
4971 "4": {
4972 "name": "constant.character.numeric.regexp"
4973 },
4974 "5": {
4975 "name": "constant.character.control.regexp"
4976 },
4977 "6": {
4978 "name": "constant.character.escape.backslash.regexp"
4979 }
4980 }
4981 },
4982 {
4983 "include": "#regex-character-class"
4984 }
4985 ]
4986 },
4987 {
4988 "include": "#regex-character-class"
4989 }
4990 ]
4991 },
4992 "regex-character-class": {
4993 "patterns": [
4994 {
4995 "name": "constant.other.character-class.regexp",
4996 "match": "\\\\[wWsSdDtrnvf]|\\."
4997 },
4998 {
4999 "name": "constant.character.numeric.regexp",
5000 "match": "\\\\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})"
5001 },
5002 {
5003 "name": "constant.character.control.regexp",
5004 "match": "\\\\c[A-Z]"
5005 },
5006 {
5007 "name": "constant.character.escape.backslash.regexp",
5008 "match": "\\\\."
5009 }
5010 ]
5011 },
5012 "comment": {
5013 "patterns": [
5014 {
5015 "name": "comment.block.documentation.js",
5016 "begin": "/\\*\\*(?!/)",
5017 "beginCaptures": {
5018 "0": {
5019 "name": "punctuation.definition.comment.js"
5020 }
5021 },
5022 "end": "\\*/",
5023 "endCaptures": {
5024 "0": {
5025 "name": "punctuation.definition.comment.js"
5026 }
5027 },
5028 "patterns": [
5029 {
5030 "include": "#docblock"
5031 }
5032 ]
5033 },
5034 {
5035 "name": "comment.block.js",
5036 "begin": "(/\\*)(?:\\s*((@)internal)(?=\\s|(\\*/)))?",
5037 "beginCaptures": {
5038 "1": {
5039 "name": "punctuation.definition.comment.js"
5040 },
5041 "2": {
5042 "name": "storage.type.internaldeclaration.js"
5043 },
5044 "3": {
5045 "name": "punctuation.decorator.internaldeclaration.js"
5046 }
5047 },
5048 "end": "\\*/",
5049 "endCaptures": {
5050 "0": {
5051 "name": "punctuation.definition.comment.js"
5052 }
5053 }
5054 },
5055 {
5056 "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)",
5057 "beginCaptures": {
5058 "1": {
5059 "name": "punctuation.whitespace.comment.leading.js"
5060 },
5061 "2": {
5062 "name": "comment.line.double-slash.js"
5063 },
5064 "3": {
5065 "name": "punctuation.definition.comment.js"
5066 },
5067 "4": {
5068 "name": "storage.type.internaldeclaration.js"
5069 },
5070 "5": {
5071 "name": "punctuation.decorator.internaldeclaration.js"
5072 }
5073 },
5074 "end": "(?=$)",
5075 "contentName": "comment.line.double-slash.js"
5076 }
5077 ]
5078 },
5079 "single-line-comment-consuming-line-ending": {
5080 "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)",
5081 "beginCaptures": {
5082 "1": {
5083 "name": "punctuation.whitespace.comment.leading.js"
5084 },
5085 "2": {
5086 "name": "comment.line.double-slash.js"
5087 },
5088 "3": {
5089 "name": "punctuation.definition.comment.js"
5090 },
5091 "4": {
5092 "name": "storage.type.internaldeclaration.js"
5093 },
5094 "5": {
5095 "name": "punctuation.decorator.internaldeclaration.js"
5096 }
5097 },
5098 "end": "(?=^)",
5099 "contentName": "comment.line.double-slash.js"
5100 },
5101 "directives": {
5102 "name": "comment.line.triple-slash.directive.js",
5103 "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name|resolution-mode)\\s*=\\s*((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))+\\s*/>\\s*$)",
5104 "beginCaptures": {
5105 "1": {
5106 "name": "punctuation.definition.comment.js"
5107 }
5108 },
5109 "end": "(?=$)",
5110 "patterns": [
5111 {
5112 "name": "meta.tag.js",
5113 "begin": "(<)(reference|amd-dependency|amd-module)",
5114 "beginCaptures": {
5115 "1": {
5116 "name": "punctuation.definition.tag.directive.js"
5117 },
5118 "2": {
5119 "name": "entity.name.tag.directive.js"
5120 }
5121 },
5122 "end": "/>",
5123 "endCaptures": {
5124 "0": {
5125 "name": "punctuation.definition.tag.directive.js"
5126 }
5127 },
5128 "patterns": [
5129 {
5130 "name": "entity.other.attribute-name.directive.js",
5131 "match": "path|types|no-default-lib|lib|name|resolution-mode"
5132 },
5133 {
5134 "name": "keyword.operator.assignment.js",
5135 "match": "="
5136 },
5137 {
5138 "include": "#string"
5139 }
5140 ]
5141 }
5142 ]
5143 },
5144 "docblock": {
5145 "patterns": [
5146 {
5147 "match": "(?x)\n((@)(?:access|api))\n\\s+\n(private|protected|public)\n\\b",
5148 "captures": {
5149 "1": {
5150 "name": "storage.type.class.jsdoc"
5151 },
5152 "2": {
5153 "name": "punctuation.definition.block.tag.jsdoc"
5154 },
5155 "3": {
5156 "name": "constant.language.access-type.jsdoc"
5157 }
5158 }
5159 },
5160 {
5161 "match": "(?x)\n((@)author)\n\\s+\n(\n [^@\\s<>*/]\n (?:[^@<>*/]|\\*[^/])*\n)\n(?:\n \\s*\n (<)\n ([^>\\s]+)\n (>)\n)?",
5162 "captures": {
5163 "1": {
5164 "name": "storage.type.class.jsdoc"
5165 },
5166 "2": {
5167 "name": "punctuation.definition.block.tag.jsdoc"
5168 },
5169 "3": {
5170 "name": "entity.name.type.instance.jsdoc"
5171 },
5172 "4": {
5173 "name": "punctuation.definition.bracket.angle.begin.jsdoc"
5174 },
5175 "5": {
5176 "name": "constant.other.email.link.underline.jsdoc"
5177 },
5178 "6": {
5179 "name": "punctuation.definition.bracket.angle.end.jsdoc"
5180 }
5181 }
5182 },
5183 {
5184 "match": "(?x)\n((@)borrows) \\s+\n((?:[^@\\s*/]|\\*[^/])+) # <that namepath>\n\\s+ (as) \\s+ # as\n((?:[^@\\s*/]|\\*[^/])+) # <this namepath>",
5185 "captures": {
5186 "1": {
5187 "name": "storage.type.class.jsdoc"
5188 },
5189 "2": {
5190 "name": "punctuation.definition.block.tag.jsdoc"
5191 },
5192 "3": {
5193 "name": "entity.name.type.instance.jsdoc"
5194 },
5195 "4": {
5196 "name": "keyword.operator.control.jsdoc"
5197 },
5198 "5": {
5199 "name": "entity.name.type.instance.jsdoc"
5200 }
5201 }
5202 },
5203 {
5204 "name": "meta.example.jsdoc",
5205 "begin": "((@)example)\\s+",
5206 "end": "(?=@|\\*/)",
5207 "beginCaptures": {
5208 "1": {
5209 "name": "storage.type.class.jsdoc"
5210 },
5211 "2": {
5212 "name": "punctuation.definition.block.tag.jsdoc"
5213 }
5214 },
5215 "patterns": [
5216 {
5217 "match": "^\\s\\*\\s+"
5218 },
5219 {
5220 "contentName": "constant.other.description.jsdoc",
5221 "begin": "\\G(<)caption(>)",
5222 "beginCaptures": {
5223 "0": {
5224 "name": "entity.name.tag.inline.jsdoc"
5225 },
5226 "1": {
5227 "name": "punctuation.definition.bracket.angle.begin.jsdoc"
5228 },
5229 "2": {
5230 "name": "punctuation.definition.bracket.angle.end.jsdoc"
5231 }
5232 },
5233 "end": "(</)caption(>)|(?=\\*/)",
5234 "endCaptures": {
5235 "0": {
5236 "name": "entity.name.tag.inline.jsdoc"
5237 },
5238 "1": {
5239 "name": "punctuation.definition.bracket.angle.begin.jsdoc"
5240 },
5241 "2": {
5242 "name": "punctuation.definition.bracket.angle.end.jsdoc"
5243 }
5244 }
5245 },
5246 {
5247 "match": "[^\\s@*](?:[^*]|\\*[^/])*",
5248 "captures": {
5249 "0": {
5250 "name": "source.embedded.js"
5251 }
5252 }
5253 }
5254 ]
5255 },
5256 {
5257 "match": "(?x) ((@)kind) \\s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \\b",
5258 "captures": {
5259 "1": {
5260 "name": "storage.type.class.jsdoc"
5261 },
5262 "2": {
5263 "name": "punctuation.definition.block.tag.jsdoc"
5264 },
5265 "3": {
5266 "name": "constant.language.symbol-type.jsdoc"
5267 }
5268 }
5269 },
5270 {
5271 "match": "(?x)\n((@)see)\n\\s+\n(?:\n # URL\n (\n (?=https?://)\n (?:[^\\s*]|\\*[^/])+\n )\n |\n # JSDoc namepath\n (\n (?!\n # Avoid matching bare URIs (also acceptable as links)\n https?://\n |\n # Avoid matching {@inline tags}; we match those below\n (?:\\[[^\\[\\]]*\\])? # Possible description [preceding]{@tag}\n {@(?:link|linkcode|linkplain|tutorial)\\b\n )\n # Matched namepath\n (?:[^@\\s*/]|\\*[^/])+\n )\n)",
5272 "captures": {
5273 "1": {
5274 "name": "storage.type.class.jsdoc"
5275 },
5276 "2": {
5277 "name": "punctuation.definition.block.tag.jsdoc"
5278 },
5279 "3": {
5280 "name": "variable.other.link.underline.jsdoc"
5281 },
5282 "4": {
5283 "name": "entity.name.type.instance.jsdoc"
5284 }
5285 }
5286 },
5287 {
5288 "match": "(?x)\n((@)template)\n\\s+\n# One or more valid identifiers\n(\n [A-Za-z_$] # First character: non-numeric word character\n [\\w$.\\[\\]]* # Rest of identifier\n (?: # Possible list of additional identifiers\n \\s* , \\s*\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n )*\n)",
5289 "captures": {
5290 "1": {
5291 "name": "storage.type.class.jsdoc"
5292 },
5293 "2": {
5294 "name": "punctuation.definition.block.tag.jsdoc"
5295 },
5296 "3": {
5297 "name": "variable.other.jsdoc"
5298 }
5299 }
5300 },
5301 {
5302 "begin": "(?x)((@)template)\\s+(?={)",
5303 "beginCaptures": {
5304 "1": {
5305 "name": "storage.type.class.jsdoc"
5306 },
5307 "2": {
5308 "name": "punctuation.definition.block.tag.jsdoc"
5309 }
5310 },
5311 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5312 "patterns": [
5313 {
5314 "include": "#jsdoctype"
5315 },
5316 {
5317 "name": "variable.other.jsdoc",
5318 "match": "([A-Za-z_$][\\w$.\\[\\]]*)"
5319 }
5320 ]
5321 },
5322 {
5323 "match": "(?x)\n(\n (@)\n (?:arg|argument|const|constant|member|namespace|param|var)\n)\n\\s+\n(\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n)",
5324 "captures": {
5325 "1": {
5326 "name": "storage.type.class.jsdoc"
5327 },
5328 "2": {
5329 "name": "punctuation.definition.block.tag.jsdoc"
5330 },
5331 "3": {
5332 "name": "variable.other.jsdoc"
5333 }
5334 }
5335 },
5336 {
5337 "begin": "((@)typedef)\\s+(?={)",
5338 "beginCaptures": {
5339 "1": {
5340 "name": "storage.type.class.jsdoc"
5341 },
5342 "2": {
5343 "name": "punctuation.definition.block.tag.jsdoc"
5344 }
5345 },
5346 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5347 "patterns": [
5348 {
5349 "include": "#jsdoctype"
5350 },
5351 {
5352 "name": "entity.name.type.instance.jsdoc",
5353 "match": "(?:[^@\\s*/]|\\*[^/])+"
5354 }
5355 ]
5356 },
5357 {
5358 "begin": "((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\s+(?={)",
5359 "beginCaptures": {
5360 "1": {
5361 "name": "storage.type.class.jsdoc"
5362 },
5363 "2": {
5364 "name": "punctuation.definition.block.tag.jsdoc"
5365 }
5366 },
5367 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5368 "patterns": [
5369 {
5370 "include": "#jsdoctype"
5371 },
5372 {
5373 "name": "variable.other.jsdoc",
5374 "match": "([A-Za-z_$][\\w$.\\[\\]]*)"
5375 },
5376 {
5377 "name": "variable.other.jsdoc",
5378 "match": "(?x)\n(\\[)\\s*\n[\\w$]+\n(?:\n (?:\\[\\])? # Foo[ ].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [\\w$]+\n)*\n(?:\n \\s*\n (=) # [foo=bar] Default parameter value\n \\s*\n (\n # The inner regexes are to stop the match early at */ and to not stop at escaped quotes\n (?>\n \"(?:(?:\\*(?!/))|(?:\\\\(?!\"))|[^*\\\\])*?\" | # [foo=\"bar\"] Double-quoted\n '(?:(?:\\*(?!/))|(?:\\\\(?!'))|[^*\\\\])*?' | # [foo='bar'] Single-quoted\n \\[ (?:(?:\\*(?!/))|[^*])*? \\] | # [foo=[1,2]] Array literal\n (?:(?:\\*(?!/))|\\s(?!\\s*\\])|\\[.*?(?:\\]|(?=\\*/))|[^*\\s\\[\\]])* # Everything else\n )*\n )\n)?\n\\s*(?:(\\])((?:[^*\\s]|\\*[^\\s/])+)?|(?=\\*/))",
5379 "captures": {
5380 "1": {
5381 "name": "punctuation.definition.optional-value.begin.bracket.square.jsdoc"
5382 },
5383 "2": {
5384 "name": "keyword.operator.assignment.jsdoc"
5385 },
5386 "3": {
5387 "name": "source.embedded.js"
5388 },
5389 "4": {
5390 "name": "punctuation.definition.optional-value.end.bracket.square.jsdoc"
5391 },
5392 "5": {
5393 "name": "invalid.illegal.syntax.jsdoc"
5394 }
5395 }
5396 }
5397 ]
5398 },
5399 {
5400 "begin": "(?x)\n(\n (@)\n (?:define|enum|exception|export|extends|lends|implements|modifies\n |namespace|private|protected|returns?|suppress|this|throws|type\n |yields?)\n)\n\\s+(?={)",
5401 "beginCaptures": {
5402 "1": {
5403 "name": "storage.type.class.jsdoc"
5404 },
5405 "2": {
5406 "name": "punctuation.definition.block.tag.jsdoc"
5407 }
5408 },
5409 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5410 "patterns": [
5411 {
5412 "include": "#jsdoctype"
5413 }
5414 ]
5415 },
5416 {
5417 "match": "(?x)\n(\n (@)\n (?:alias|augments|callback|constructs|emits|event|fires|exports?\n |extends|external|function|func|host|lends|listens|interface|memberof!?\n |method|module|mixes|mixin|name|requires|see|this|typedef|uses)\n)\n\\s+\n(\n (?:\n [^{}@\\s*] | \\*[^/]\n )+\n)",
5418 "captures": {
5419 "1": {
5420 "name": "storage.type.class.jsdoc"
5421 },
5422 "2": {
5423 "name": "punctuation.definition.block.tag.jsdoc"
5424 },
5425 "3": {
5426 "name": "entity.name.type.instance.jsdoc"
5427 }
5428 }
5429 },
5430 {
5431 "contentName": "variable.other.jsdoc",
5432 "begin": "((@)(?:default(?:value)?|license|version))\\s+(([''\"]))",
5433 "beginCaptures": {
5434 "1": {
5435 "name": "storage.type.class.jsdoc"
5436 },
5437 "2": {
5438 "name": "punctuation.definition.block.tag.jsdoc"
5439 },
5440 "3": {
5441 "name": "variable.other.jsdoc"
5442 },
5443 "4": {
5444 "name": "punctuation.definition.string.begin.jsdoc"
5445 }
5446 },
5447 "end": "(\\3)|(?=$|\\*/)",
5448 "endCaptures": {
5449 "0": {
5450 "name": "variable.other.jsdoc"
5451 },
5452 "1": {
5453 "name": "punctuation.definition.string.end.jsdoc"
5454 }
5455 }
5456 },
5457 {
5458 "match": "((@)(?:default(?:value)?|license|tutorial|variation|version))\\s+([^\\s*]+)",
5459 "captures": {
5460 "1": {
5461 "name": "storage.type.class.jsdoc"
5462 },
5463 "2": {
5464 "name": "punctuation.definition.block.tag.jsdoc"
5465 },
5466 "3": {
5467 "name": "variable.other.jsdoc"
5468 }
5469 }
5470 },
5471 {
5472 "name": "storage.type.class.jsdoc",
5473 "match": "(?x) (@) (?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc |inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method |mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects |override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected |public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary |suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation |version|virtual|writeOnce|yields?) \\b",
5474 "captures": {
5475 "1": {
5476 "name": "punctuation.definition.block.tag.jsdoc"
5477 }
5478 }
5479 },
5480 {
5481 "include": "#inline-tags"
5482 },
5483 {
5484 "match": "((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\\s+)",
5485 "captures": {
5486 "1": {
5487 "name": "storage.type.class.jsdoc"
5488 },
5489 "2": {
5490 "name": "punctuation.definition.block.tag.jsdoc"
5491 }
5492 }
5493 }
5494 ]
5495 },
5496 "brackets": {
5497 "patterns": [
5498 {
5499 "begin": "{",
5500 "end": "}|(?=\\*/)",
5501 "patterns": [
5502 {
5503 "include": "#brackets"
5504 }
5505 ]
5506 },
5507 {
5508 "begin": "\\[",
5509 "end": "\\]|(?=\\*/)",
5510 "patterns": [
5511 {
5512 "include": "#brackets"
5513 }
5514 ]
5515 }
5516 ]
5517 },
5518 "inline-tags": {
5519 "patterns": [
5520 {
5521 "name": "constant.other.description.jsdoc",
5522 "match": "(\\[)[^\\]]+(\\])(?={@(?:link|linkcode|linkplain|tutorial))",
5523 "captures": {
5524 "1": {
5525 "name": "punctuation.definition.bracket.square.begin.jsdoc"
5526 },
5527 "2": {
5528 "name": "punctuation.definition.bracket.square.end.jsdoc"
5529 }
5530 }
5531 },
5532 {
5533 "name": "entity.name.type.instance.jsdoc",
5534 "begin": "({)((@)(?:link(?:code|plain)?|tutorial))\\s*",
5535 "beginCaptures": {
5536 "1": {
5537 "name": "punctuation.definition.bracket.curly.begin.jsdoc"
5538 },
5539 "2": {
5540 "name": "storage.type.class.jsdoc"
5541 },
5542 "3": {
5543 "name": "punctuation.definition.inline.tag.jsdoc"
5544 }
5545 },
5546 "end": "}|(?=\\*/)",
5547 "endCaptures": {
5548 "0": {
5549 "name": "punctuation.definition.bracket.curly.end.jsdoc"
5550 }
5551 },
5552 "patterns": [
5553 {
5554 "match": "\\G((?=https?://)(?:[^|}\\s*]|\\*[/])+)(\\|)?",
5555 "captures": {
5556 "1": {
5557 "name": "variable.other.link.underline.jsdoc"
5558 },
5559 "2": {
5560 "name": "punctuation.separator.pipe.jsdoc"
5561 }
5562 }
5563 },
5564 {
5565 "match": "\\G((?:[^{}@\\s|*]|\\*[^/])+)(\\|)?",
5566 "captures": {
5567 "1": {
5568 "name": "variable.other.description.jsdoc"
5569 },
5570 "2": {
5571 "name": "punctuation.separator.pipe.jsdoc"
5572 }
5573 }
5574 }
5575 ]
5576 }
5577 ]
5578 },
5579 "jsdoctype": {
5580 "patterns": [
5581 {
5582 "contentName": "entity.name.type.instance.jsdoc",
5583 "begin": "\\G({)",
5584 "beginCaptures": {
5585 "0": {
5586 "name": "entity.name.type.instance.jsdoc"
5587 },
5588 "1": {
5589 "name": "punctuation.definition.bracket.curly.begin.jsdoc"
5590 }
5591 },
5592 "end": "((}))\\s*|(?=\\*/)",
5593 "endCaptures": {
5594 "1": {
5595 "name": "entity.name.type.instance.jsdoc"
5596 },
5597 "2": {
5598 "name": "punctuation.definition.bracket.curly.end.jsdoc"
5599 }
5600 },
5601 "patterns": [
5602 {
5603 "include": "#brackets"
5604 }
5605 ]
5606 }
5607 ]
5608 },
5609 "jsx": {
5610 "patterns": [
5611 {
5612 "include": "#jsx-tag-without-attributes-in-expression"
5613 },
5614 {
5615 "include": "#jsx-tag-in-expression"
5616 }
5617 ]
5618 },
5619 "jsx-tag-without-attributes-in-expression": {
5620 "begin": "(?<!\\+\\+|--)(?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\*\\/|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*(?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>))",
5621 "end": "(?!(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>))",
5622 "patterns": [
5623 {
5624 "include": "#jsx-tag-without-attributes"
5625 }
5626 ]
5627 },
5628 "jsx-tag-without-attributes": {
5629 "name": "meta.tag.without-attributes.js",
5630 "begin": "(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>)",
5631 "end": "(</)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>)",
5632 "beginCaptures": {
5633 "1": {
5634 "name": "punctuation.definition.tag.begin.js"
5635 },
5636 "2": {
5637 "name": "entity.name.tag.namespace.js"
5638 },
5639 "3": {
5640 "name": "punctuation.separator.namespace.js"
5641 },
5642 "4": {
5643 "name": "entity.name.tag.js"
5644 },
5645 "5": {
5646 "name": "support.class.component.js"
5647 },
5648 "6": {
5649 "name": "punctuation.definition.tag.end.js"
5650 }
5651 },
5652 "endCaptures": {
5653 "1": {
5654 "name": "punctuation.definition.tag.begin.js"
5655 },
5656 "2": {
5657 "name": "entity.name.tag.namespace.js"
5658 },
5659 "3": {
5660 "name": "punctuation.separator.namespace.js"
5661 },
5662 "4": {
5663 "name": "entity.name.tag.js"
5664 },
5665 "5": {
5666 "name": "support.class.component.js"
5667 },
5668 "6": {
5669 "name": "punctuation.definition.tag.end.js"
5670 }
5671 },
5672 "contentName": "meta.jsx.children.js",
5673 "patterns": [
5674 {
5675 "include": "#jsx-children"
5676 }
5677 ]
5678 },
5679 "jsx-tag-in-expression": {
5680 "begin": "(?x)\n (?<!\\+\\+|--)(?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\*\\/|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>))",
5681 "end": "(?!(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>))",
5682 "patterns": [
5683 {
5684 "include": "#jsx-tag"
5685 }
5686 ]
5687 },
5688 "jsx-tag": {
5689 "name": "meta.tag.js",
5690 "begin": "(?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>))",
5691 "end": "(/>)|(?:(</)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>))",
5692 "endCaptures": {
5693 "1": {
5694 "name": "punctuation.definition.tag.end.js"
5695 },
5696 "2": {
5697 "name": "punctuation.definition.tag.begin.js"
5698 },
5699 "3": {
5700 "name": "entity.name.tag.namespace.js"
5701 },
5702 "4": {
5703 "name": "punctuation.separator.namespace.js"
5704 },
5705 "5": {
5706 "name": "entity.name.tag.js"
5707 },
5708 "6": {
5709 "name": "support.class.component.js"
5710 },
5711 "7": {
5712 "name": "punctuation.definition.tag.end.js"
5713 }
5714 },
5715 "patterns": [
5716 {
5717 "begin": "(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>)",
5718 "beginCaptures": {
5719 "1": {
5720 "name": "punctuation.definition.tag.begin.js"
5721 },
5722 "2": {
5723 "name": "entity.name.tag.namespace.js"
5724 },
5725 "3": {
5726 "name": "punctuation.separator.namespace.js"
5727 },
5728 "4": {
5729 "name": "entity.name.tag.js"
5730 },
5731 "5": {
5732 "name": "support.class.component.js"
5733 }
5734 },
5735 "end": "(?=[/]?>)",
5736 "patterns": [
5737 {
5738 "include": "#comment"
5739 },
5740 {
5741 "include": "#type-arguments"
5742 },
5743 {
5744 "include": "#jsx-tag-attributes"
5745 }
5746 ]
5747 },
5748 {
5749 "begin": "(>)",
5750 "beginCaptures": {
5751 "1": {
5752 "name": "punctuation.definition.tag.end.js"
5753 }
5754 },
5755 "end": "(?=</)",
5756 "contentName": "meta.jsx.children.js",
5757 "patterns": [
5758 {
5759 "include": "#jsx-children"
5760 }
5761 ]
5762 }
5763 ]
5764 },
5765 "jsx-children": {
5766 "patterns": [
5767 {
5768 "include": "#jsx-tag-without-attributes"
5769 },
5770 {
5771 "include": "#jsx-tag"
5772 },
5773 {
5774 "include": "#jsx-evaluated-code"
5775 },
5776 {
5777 "include": "#jsx-entities"
5778 }
5779 ]
5780 },
5781 "jsx-evaluated-code": {
5782 "contentName": "meta.embedded.expression.js",
5783 "begin": "\\{",
5784 "end": "\\}",
5785 "beginCaptures": {
5786 "0": {
5787 "name": "punctuation.section.embedded.begin.js"
5788 }
5789 },
5790 "endCaptures": {
5791 "0": {
5792 "name": "punctuation.section.embedded.end.js"
5793 }
5794 },
5795 "patterns": [
5796 {
5797 "include": "#expression"
5798 }
5799 ]
5800 },
5801 "jsx-entities": {
5802 "patterns": [
5803 {
5804 "name": "constant.character.entity.js",
5805 "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
5806 "captures": {
5807 "1": {
5808 "name": "punctuation.definition.entity.js"
5809 },
5810 "3": {
5811 "name": "punctuation.definition.entity.js"
5812 }
5813 }
5814 },
5815 {
5816 "name": "invalid.illegal.bad-ampersand.js",
5817 "match": "&"
5818 }
5819 ]
5820 },
5821 "jsx-tag-attributes": {
5822 "name": "meta.tag.attributes.js",
5823 "begin": "\\s+",
5824 "end": "(?=[/]?>)",
5825 "patterns": [
5826 {
5827 "include": "#comment"
5828 },
5829 {
5830 "include": "#jsx-tag-attribute-name"
5831 },
5832 {
5833 "include": "#jsx-tag-attribute-assignment"
5834 },
5835 {
5836 "include": "#jsx-string-double-quoted"
5837 },
5838 {
5839 "include": "#jsx-string-single-quoted"
5840 },
5841 {
5842 "include": "#jsx-evaluated-code"
5843 },
5844 {
5845 "include": "#jsx-tag-attributes-illegal"
5846 }
5847 ]
5848 },
5849 "jsx-tag-attribute-name": {
5850 "match": "(?x)\n \\s*\n (?:([_$[:alpha:]][-_$[:alnum:].]*)(:))?\n ([_$[:alpha:]][-_$[:alnum:]]*)\n (?=\\s|=|/?>|/\\*|//)",
5851 "captures": {
5852 "1": {
5853 "name": "entity.other.attribute-name.namespace.js"
5854 },
5855 "2": {
5856 "name": "punctuation.separator.namespace.js"
5857 },
5858 "3": {
5859 "name": "entity.other.attribute-name.js"
5860 }
5861 }
5862 },
5863 "jsx-tag-attribute-assignment": {
5864 "name": "keyword.operator.assignment.js",
5865 "match": "=(?=\\s*(?:'|\"|{|/\\*|//|\\n))"
5866 },
5867 "jsx-string-double-quoted": {
5868 "name": "string.quoted.double.js",
5869 "begin": "\"",
5870 "end": "\"",
5871 "beginCaptures": {
5872 "0": {
5873 "name": "punctuation.definition.string.begin.js"
5874 }
5875 },
5876 "endCaptures": {
5877 "0": {
5878 "name": "punctuation.definition.string.end.js"
5879 }
5880 },
5881 "patterns": [
5882 {
5883 "include": "#jsx-entities"
5884 }
5885 ]
5886 },
5887 "jsx-string-single-quoted": {
5888 "name": "string.quoted.single.js",
5889 "begin": "'",
5890 "end": "'",
5891 "beginCaptures": {
5892 "0": {
5893 "name": "punctuation.definition.string.begin.js"
5894 }
5895 },
5896 "endCaptures": {
5897 "0": {
5898 "name": "punctuation.definition.string.end.js"
5899 }
5900 },
5901 "patterns": [
5902 {
5903 "include": "#jsx-entities"
5904 }
5905 ]
5906 },
5907 "jsx-tag-attributes-illegal": {
5908 "name": "invalid.illegal.attribute.js",
5909 "match": "\\S+"
5910 }
5911 }
5912 }
5913