Elffuss BraidHub

kikocis/continue public

40d345e8c2b5 · 97.9 KiBRawPermalink
1{
2 "name": "JavaScript (with React support)",
3 "scopeName": "source.js",
4 "fileTypes": [
5 ".js",
6 ".jsx"
7 ],
8 "uuid": "805375ec-d614-41f5-8993-5843fe63ea82",
9 "patterns": [
10 {
11 "include": "#directives"
12 },
13 {
14 "include": "#statements"
15 },
16 {
17 "name": "comment.line.shebang.ts",
18 "match": "\\A(#!).*(?=$)",
19 "captures": {
20 "1": {
21 "name": "punctuation.definition.comment.ts"
22 }
23 }
24 }
25 ],
26 "repository": {
27 "statements": {
28 "patterns": [
29 {
30 "include": "#string"
31 },
32 {
33 "include": "#template"
34 },
35 {
36 "include": "#comment"
37 },
38 {
39 "include": "#literal"
40 },
41 {
42 "include": "#declaration"
43 },
44 {
45 "include": "#switch-statement"
46 },
47 {
48 "include": "#for-loop"
49 },
50 {
51 "include": "#after-operator-block"
52 },
53 {
54 "include": "#decl-block"
55 },
56 {
57 "include": "#control-statement"
58 },
59 {
60 "include": "#expression"
61 },
62 {
63 "include": "#punctuation-semicolon"
64 }
65 ]
66 },
67 "var-expr": {
68 "name": "meta.var.expr.js",
69 "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(var|let|const(?!\\s+enum\\b))\\b(?!\\$)",
70 "beginCaptures": {
71 "1": {
72 "name": "keyword.control.export.js"
73 },
74 "2": {
75 "name": "storage.type.js"
76 }
77 },
78 "end": "(?=$|;|}|(\\s+(of|in)\\s+))",
79 "patterns": [
80 {
81 "include": "#destructuring-variable"
82 },
83 {
84 "include": "#var-single-variable"
85 },
86 {
87 "include": "#variable-initializer"
88 },
89 {
90 "include": "#comment"
91 },
92 {
93 "include": "#punctuation-comma"
94 }
95 ]
96 },
97 "var-single-variable": {
98 "patterns": [
99 {
100 "name": "meta.var-single-variable.expr.js",
101 "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s* (=\\s*( (async\\s+) | (function\\s*[(<]) | (function\\s+) | ([_$[:alpha:]][_$[:alnum:]]*\\s*=>) | ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)) ) | (:\\s*( (<) | ([(]\\s*( ([)]) | (\\.\\.\\.) | ([_$[:alnum:]]+\\s*( ([:,?=])| ([)]\\s*=>) )) ))) ))",
102 "beginCaptures": {
103 "1": {
104 "name": "entity.name.function.js"
105 }
106 },
107 "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
108 "patterns": [
109 {
110 "include": "#type-annotation"
111 },
112 {
113 "include": "#string"
114 },
115 {
116 "include": "#comment"
117 }
118 ]
119 },
120 {
121 "name": "meta.var-single-variable.expr.js",
122 "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
123 "beginCaptures": {
124 "1": {
125 "name": "variable.other.readwrite.js"
126 }
127 },
128 "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
129 "patterns": [
130 {
131 "include": "#type-annotation"
132 },
133 {
134 "include": "#string"
135 },
136 {
137 "include": "#comment"
138 }
139 ]
140 }
141 ]
142 },
143 "destructuring-variable": {
144 "patterns": [
145 {
146 "name": "meta.object-binding-pattern-variable.js",
147 "begin": "(?<!=|:|of|in)\\s*(?=\\{)",
148 "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
149 "patterns": [
150 {
151 "include": "#object-binding-pattern"
152 },
153 {
154 "include": "#type-annotation"
155 },
156 {
157 "include": "#comment"
158 }
159 ]
160 },
161 {
162 "name": "meta.array-binding-pattern-variable.js",
163 "begin": "(?<!=|:|of|in)\\s*(?=\\[)",
164 "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
165 "patterns": [
166 {
167 "include": "#array-binding-pattern"
168 },
169 {
170 "include": "#type-annotation"
171 },
172 {
173 "include": "#comment"
174 }
175 ]
176 }
177 ]
178 },
179 "object-binding-element": {
180 "patterns": [
181 {
182 "include": "#comment"
183 },
184 {
185 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(:))",
186 "end": "(?=,|\\})",
187 "patterns": [
188 {
189 "include": "#object-binding-element-propertyName"
190 },
191 {
192 "include": "#binding-element"
193 }
194 ]
195 },
196 {
197 "include": "#object-binding-pattern"
198 },
199 {
200 "include": "#destructuring-variable-rest"
201 },
202 {
203 "include": "#variable-initializer"
204 },
205 {
206 "include": "#punctuation-comma"
207 }
208 ]
209 },
210 "object-binding-element-propertyName": {
211 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(:))",
212 "end": "(:)",
213 "endCaptures": {
214 "0": {
215 "name": "punctuation.destructuring.js"
216 }
217 },
218 "patterns": [
219 {
220 "include": "#string"
221 },
222 {
223 "include": "#array-literal"
224 },
225 {
226 "name": "variable.object.property.js",
227 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
228 }
229 ]
230 },
231 "binding-element": {
232 "patterns": [
233 {
234 "include": "#comment"
235 },
236 {
237 "include": "#object-binding-pattern"
238 },
239 {
240 "include": "#array-binding-pattern"
241 },
242 {
243 "include": "#destructuring-variable-rest"
244 },
245 {
246 "include": "#variable-initializer"
247 }
248 ]
249 },
250 "destructuring-variable-rest": {
251 "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
252 "captures": {
253 "1": {
254 "name": "keyword.operator.rest.js"
255 },
256 "2": {
257 "name": "variable.other.readwrite.js"
258 }
259 }
260 },
261 "object-binding-pattern": {
262 "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
263 "beginCaptures": {
264 "1": {
265 "name": "keyword.operator.rest.js"
266 },
267 "2": {
268 "name": "punctuation.definition.binding-pattern.object.js"
269 }
270 },
271 "end": "\\}",
272 "endCaptures": {
273 "0": {
274 "name": "punctuation.definition.binding-pattern.object.js"
275 }
276 },
277 "patterns": [
278 {
279 "include": "#object-binding-element"
280 }
281 ]
282 },
283 "array-binding-pattern": {
284 "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
285 "beginCaptures": {
286 "1": {
287 "name": "keyword.operator.rest.js"
288 },
289 "2": {
290 "name": "punctuation.definition.binding-pattern.array.js"
291 }
292 },
293 "end": "\\]",
294 "endCaptures": {
295 "0": {
296 "name": "punctuation.definition.binding-pattern.array.js"
297 }
298 },
299 "patterns": [
300 {
301 "include": "#binding-element"
302 },
303 {
304 "include": "#punctuation-comma"
305 }
306 ]
307 },
308 "ternary-expression": {
309 "begin": "(?=\\?)",
310 "end": "(?=$|[;,})\\]])",
311 "patterns": [
312 {
313 "include": "#ternary-operator"
314 },
315 {
316 "include": "#expression"
317 }
318 ]
319 },
320 "ternary-operator": {
321 "begin": "(\\?)",
322 "beginCaptures": {
323 "0": {
324 "name": "keyword.operator.ternary.js"
325 }
326 },
327 "end": "(:)",
328 "endCaptures": {
329 "0": {
330 "name": "keyword.operator.ternary.js"
331 }
332 },
333 "patterns": [
334 {
335 "include": "#expression"
336 }
337 ]
338 },
339 "expression": {
340 "name": "meta.expression.js",
341 "patterns": [
342 {
343 "include": "#jsx"
344 },
345 {
346 "include": "#string"
347 },
348 {
349 "include": "#regex"
350 },
351 {
352 "include": "#template"
353 },
354 {
355 "include": "#comment"
356 },
357 {
358 "include": "#literal"
359 },
360 {
361 "include": "#function-declaration"
362 },
363 {
364 "include": "#class-or-interface-declaration"
365 },
366 {
367 "include": "#arrow-function"
368 },
369 {
370 "include": "#cast"
371 },
372 {
373 "include": "#ternary-expression"
374 },
375 {
376 "include": "#new-expr"
377 },
378 {
379 "include": "#object-literal"
380 },
381 {
382 "include": "#expression-operators"
383 },
384 {
385 "include": "#function-call"
386 },
387 {
388 "include": "#support-objects"
389 },
390 {
391 "include": "#identifiers"
392 },
393 {
394 "include": "#paren-expression"
395 },
396 {
397 "include": "#punctuation-comma"
398 },
399 {
400 "include": "#punctuation-accessor"
401 }
402 ]
403 },
404 "control-statement": {
405 "patterns": [
406 {
407 "name": "keyword.control.trycatch.js",
408 "match": "(?<!\\.|\\$)\\b(catch|finally|throw|try)\\b(?!\\$)"
409 },
410 {
411 "name": "keyword.control.loop.js",
412 "match": "(?<!\\.|\\$)\\b(break|continue|do|goto|while)\\b(?!\\$)"
413 },
414 {
415 "name": "keyword.control.flow.js",
416 "match": "(?<!\\.|\\$)\\b(return)\\b(?!\\$)"
417 },
418 {
419 "match": "(?<!\\.|\\$)\\b(yield)\\b(?!\\$)(?:\\s*(\\*))?",
420 "captures": {
421 "1": {
422 "name": "keyword.control.flow.js"
423 },
424 "2": {
425 "name": "keyword.generator.asterisk.js"
426 }
427 }
428 },
429 {
430 "name": "keyword.control.switch.js",
431 "match": "(?<!\\.|\\$)\\b(case|default|switch)\\b(?!\\$)"
432 },
433 {
434 "name": "keyword.control.conditional.js",
435 "match": "(?<!\\.|\\$)\\b(else|if)\\b(?!\\$)"
436 },
437 {
438 "name": "keyword.control.with.js",
439 "match": "(?<!\\.|\\$)\\b(with)\\b(?!\\$)"
440 },
441 {
442 "name": "keyword.other.debugger.js",
443 "match": "(?<!\\.|\\$)\\b(debugger)\\b(?!\\$)"
444 },
445 {
446 "name": "storage.modifier.js",
447 "match": "(?<!\\.|\\$)\\b(declare)\\b(?!\\$)"
448 }
449 ]
450 },
451 "declaration": {
452 "name": "meta.declaration.js",
453 "patterns": [
454 {
455 "include": "#decorator"
456 },
457 {
458 "include": "#var-expr"
459 },
460 {
461 "include": "#function-declaration"
462 },
463 {
464 "include": "#class-or-interface-declaration"
465 },
466 {
467 "include": "#type-declaration"
468 },
469 {
470 "include": "#enum-declaration"
471 },
472 {
473 "include": "#namespace-declaration"
474 },
475 {
476 "include": "#import-equals-declaration"
477 },
478 {
479 "include": "#import-declaration"
480 },
481 {
482 "include": "#export-declaration"
483 }
484 ]
485 },
486 "decorator": {
487 "name": "meta.decorator.js",
488 "begin": "(?<!\\.|\\$)\\@",
489 "beginCaptures": {
490 "0": {
491 "name": "punctuation.decorator.js"
492 }
493 },
494 "end": "(?=\\s)",
495 "patterns": [
496 {
497 "include": "#expression"
498 }
499 ]
500 },
501 "type-declaration": {
502 "name": "meta.type.declaration.js",
503 "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(type)\\b\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*",
504 "beginCaptures": {
505 "1": {
506 "name": "keyword.control.export.js"
507 },
508 "2": {
509 "name": "storage.type.type.js"
510 },
511 "3": {
512 "name": "entity.name.type.js"
513 }
514 },
515 "end": "(?=[};]|\\bvar\\b|\\blet\\b|\\bconst\\b|\\btype\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\bnamespace\\b|\\bmodule\\b|\\bimport\\b|\\benum\\b|\\bdeclare\\b|\\bexport\\b|\\babstract\\b|\\basync\\b)",
516 "patterns": [
517 {
518 "include": "#comment"
519 },
520 {
521 "include": "#type-parameters"
522 },
523 {
524 "include": "#type"
525 },
526 {
527 "match": "(=)\\s*",
528 "captures": {
529 "1": {
530 "name": "keyword.operator.assignment.js"
531 }
532 }
533 }
534 ]
535 },
536 "enum-declaration": {
537 "name": "meta.enum.declaration.js",
538 "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?(?:\\b(const)\\s+)?\\b(enum)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
539 "beginCaptures": {
540 "1": {
541 "name": "keyword.control.export.js"
542 },
543 "2": {
544 "name": "storage.modifier.js"
545 },
546 "3": {
547 "name": "storage.type.enum.js"
548 },
549 "4": {
550 "name": "entity.name.type.enum.js"
551 }
552 },
553 "end": "(?<=\\})",
554 "patterns": [
555 {
556 "include": "#comment"
557 },
558 {
559 "begin": "\\{",
560 "beginCaptures": {
561 "0": {
562 "name": "punctuation.definition.block.js"
563 }
564 },
565 "end": "\\}",
566 "endCaptures": {
567 "0": {
568 "name": "punctuation.definition.block.js"
569 }
570 },
571 "patterns": [
572 {
573 "include": "#comment"
574 },
575 {
576 "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
577 "beginCaptures": {
578 "0": {
579 "name": "variable.other.enummember.js"
580 }
581 },
582 "end": "(?=,|\\}|$)",
583 "patterns": [
584 {
585 "include": "#comment"
586 },
587 {
588 "include": "#variable-initializer"
589 }
590 ]
591 },
592 {
593 "begin": "(?=((\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\])))",
594 "end": "(?=,|\\}|$)",
595 "patterns": [
596 {
597 "include": "#string"
598 },
599 {
600 "include": "#array-literal"
601 },
602 {
603 "include": "#comment"
604 },
605 {
606 "include": "#variable-initializer"
607 }
608 ]
609 },
610 {
611 "include": "#punctuation-comma"
612 }
613 ]
614 }
615 ]
616 },
617 "namespace-declaration": {
618 "name": "meta.namespace.declaration.js",
619 "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(namespace|module)\\s+",
620 "beginCaptures": {
621 "1": {
622 "name": "keyword.control.export.js"
623 },
624 "2": {
625 "name": "storage.type.namespace.js"
626 }
627 },
628 "end": "(?=$|\\{)",
629 "patterns": [
630 {
631 "include": "#comment"
632 },
633 {
634 "include": "#string"
635 },
636 {
637 "name": "entity.name.type.module.js",
638 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
639 },
640 {
641 "name": "punctuation.accessor.js",
642 "match": "\\."
643 }
644 ]
645 },
646 "import-equals-declaration": {
647 "patterns": [
648 {
649 "name": "meta.import-equals.external.js",
650 "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(require)\\s*(\\()",
651 "beginCaptures": {
652 "1": {
653 "name": "keyword.control.export.js"
654 },
655 "2": {
656 "name": "keyword.control.import.js"
657 },
658 "3": {
659 "name": "variable.other.readwrite.alias.js"
660 },
661 "4": {
662 "name": "keyword.operator.assignment.js"
663 },
664 "5": {
665 "name": "keyword.control.require.js"
666 },
667 "6": {
668 "name": "meta.brace.round.js"
669 }
670 },
671 "end": "\\)",
672 "endCaptures": {
673 "0": {
674 "name": "meta.brace.round.js"
675 }
676 },
677 "patterns": [
678 {
679 "include": "#comment"
680 },
681 {
682 "include": "#string"
683 }
684 ]
685 },
686 {
687 "name": "meta.import-equals.internal.js",
688 "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(?!require\\b)",
689 "beginCaptures": {
690 "1": {
691 "name": "keyword.control.export.js"
692 },
693 "2": {
694 "name": "keyword.control.import.js"
695 },
696 "3": {
697 "name": "variable.other.readwrite.alias.js"
698 },
699 "4": {
700 "name": "keyword.operator.assignment.js"
701 }
702 },
703 "end": "(?=;|$)",
704 "patterns": [
705 {
706 "include": "#comment"
707 },
708 {
709 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)",
710 "captures": {
711 "1": {
712 "name": "entity.name.type.module.js"
713 },
714 "2": {
715 "name": "punctuation.accessor.js"
716 }
717 }
718 },
719 {
720 "name": "variable.other.readwrite.js",
721 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
722 }
723 ]
724 }
725 ]
726 },
727 "import-declaration": {
728 "name": "meta.import.js",
729 "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)(?!(\\s*:)|(\\$))\\b",
730 "beginCaptures": {
731 "1": {
732 "name": "keyword.control.export.js"
733 },
734 "2": {
735 "name": "keyword.control.import.js"
736 }
737 },
738 "end": "(?=;|$)",
739 "patterns": [
740 {
741 "include": "#import-export-declaration"
742 }
743 ]
744 },
745 "export-declaration": {
746 "patterns": [
747 {
748 "match": "(?<!\\.|\\$)\\b(export)\\s+(as)\\s+(namespace)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
749 "captures": {
750 "1": {
751 "name": "keyword.control.export.js"
752 },
753 "2": {
754 "name": "keyword.control.as.js"
755 },
756 "3": {
757 "name": "storage.type.namespace.js"
758 },
759 "4": {
760 "name": "entity.name.type.module.js"
761 }
762 }
763 },
764 {
765 "name": "meta.export.default.js",
766 "begin": "(?<!\\.|\\$)\\b(export)(?:(?:\\s*(=))|(?:\\s+(default)(?=\\s+)))",
767 "beginCaptures": {
768 "1": {
769 "name": "keyword.control.export.js"
770 },
771 "2": {
772 "name": "keyword.operator.assignment.js"
773 },
774 "3": {
775 "name": "keyword.control.default.js"
776 }
777 },
778 "end": "(?=;|\\bexport\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\blet\\b|\\bvar\\b|\\bconst\\b|\\bimport\\b|\\benum\\b|\\bnamespace\\b|\\bmodule\\b|\\btype\\b|\\babstract\\b|\\bdeclare\\b|\\basync\\b|$)",
779 "patterns": [
780 {
781 "include": "#expression"
782 }
783 ]
784 },
785 {
786 "name": "meta.export.js",
787 "begin": "(?<!\\.|\\$)\\b(export)(?!(\\s*:)|(\\$))\\b",
788 "beginCaptures": {
789 "0": {
790 "name": "keyword.control.export.js"
791 }
792 },
793 "end": "(?=;|\\bexport\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\blet\\b|\\bvar\\b|\\bconst\\b|\\bimport\\b|\\benum\\b|\\bnamespace\\b|\\bmodule\\b|\\btype\\b|\\babstract\\b|\\bdeclare\\b|\\basync\\b|$)",
794 "patterns": [
795 {
796 "include": "#import-export-declaration"
797 }
798 ]
799 }
800 ]
801 },
802 "import-export-declaration": {
803 "patterns": [
804 {
805 "include": "#comment"
806 },
807 {
808 "include": "#string"
809 },
810 {
811 "include": "#import-export-block"
812 },
813 {
814 "name": "keyword.control.from.js",
815 "match": "\\bfrom\\b"
816 },
817 {
818 "include": "#import-export-clause"
819 }
820 ]
821 },
822 "import-export-block": {
823 "name": "meta.block.js",
824 "begin": "\\{",
825 "beginCaptures": {
826 "0": {
827 "name": "punctuation.definition.block.js"
828 }
829 },
830 "end": "\\}",
831 "endCaptures": {
832 "0": {
833 "name": "punctuation.definition.block.js"
834 }
835 },
836 "patterns": [
837 {
838 "include": "#import-export-clause"
839 }
840 ]
841 },
842 "import-export-clause": {
843 "patterns": [
844 {
845 "include": "#comment"
846 },
847 {
848 "comment": "(default|*|name) as alias",
849 "match": "(?x) (?: \\b(default)\\b | (\\*) | ([_$[:alpha:]][_$[:alnum:]]*)) \\s+ (as) \\s+ (?: (\\b default \\b | \\*) | ([_$[:alpha:]][_$[:alnum:]]*))",
850 "captures": {
851 "1": {
852 "name": "keyword.control.default.js"
853 },
854 "2": {
855 "name": "constant.language.import-export-all.js"
856 },
857 "3": {
858 "name": "variable.other.readwrite.js"
859 },
860 "4": {
861 "name": "keyword.control.as.js"
862 },
863 "5": {
864 "name": "invalid.illegal.js"
865 },
866 "6": {
867 "name": "variable.other.readwrite.alias.js"
868 }
869 }
870 },
871 {
872 "include": "#punctuation-comma"
873 },
874 {
875 "name": "constant.language.import-export-all.js",
876 "match": "\\*"
877 },
878 {
879 "name": "keyword.control.default.js",
880 "match": "\\b(default)\\b"
881 },
882 {
883 "name": "variable.other.readwrite.alias.js",
884 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
885 }
886 ]
887 },
888 "class-or-interface-declaration": {
889 "name": "meta.class.js",
890 "begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(?:(class)|(interface))\\b",
891 "beginCaptures": {
892 "1": {
893 "name": "keyword.control.export.js"
894 },
895 "2": {
896 "name": "storage.modifier.js"
897 },
898 "3": {
899 "name": "storage.type.class.js"
900 },
901 "4": {
902 "name": "storage.type.interface.js"
903 }
904 },
905 "end": "(?<=\\})",
906 "endCaptures": {
907 "1": {
908 "name": "punctuation.definition.block.js"
909 }
910 },
911 "patterns": [
912 {
913 "include": "#comment"
914 },
915 {
916 "include": "#class-or-interface-heritage"
917 },
918 {
919 "match": "[_$[:alpha:]][_$[:alnum:]]*",
920 "captures": {
921 "0": {
922 "name": "entity.name.type.class.js"
923 }
924 }
925 },
926 {
927 "include": "#type-parameters"
928 },
929 {
930 "include": "#class-or-interface-body"
931 }
932 ]
933 },
934 "class-or-interface-heritage": {
935 "begin": "(?<!\\.|\\$)(?:\\b(extends|implements)\\b)(?!\\$)",
936 "beginCaptures": {
937 "1": {
938 "name": "storage.modifier.js"
939 }
940 },
941 "end": "(?=\\{)",
942 "endCaptures": {
943 "1": {
944 "name": "punctuation.definition.block.js"
945 }
946 },
947 "patterns": [
948 {
949 "include": "#comment"
950 },
951 {
952 "include": "#class-or-interface-heritage"
953 },
954 {
955 "include": "#type-parameters"
956 },
957 {
958 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)(?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)*\\s*([,<{]|extends|implements|//|/\\*))",
959 "captures": {
960 "1": {
961 "name": "entity.name.type.module.js"
962 },
963 "2": {
964 "name": "punctuation.accessor.js"
965 }
966 }
967 },
968 {
969 "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*([,<{]|extends|implements|//|/\\*))",
970 "captures": {
971 "1": {
972 "name": "entity.other.inherited-class.js"
973 }
974 }
975 },
976 {
977 "include": "#expression"
978 }
979 ]
980 },
981 "class-or-interface-body": {
982 "begin": "\\{",
983 "beginCaptures": {
984 "0": {
985 "name": "punctuation.definition.block.js"
986 }
987 },
988 "end": "\\}",
989 "endCaptures": {
990 "0": {
991 "name": "punctuation.definition.block.js"
992 }
993 },
994 "patterns": [
995 {
996 "include": "#string"
997 },
998 {
999 "include": "#comment"
1000 },
1001 {
1002 "include": "#decorator"
1003 },
1004 {
1005 "include": "#method-declaration"
1006 },
1007 {
1008 "include": "#indexer-declaration"
1009 },
1010 {
1011 "include": "#field-declaration"
1012 },
1013 {
1014 "include": "#type-annotation"
1015 },
1016 {
1017 "include": "#variable-initializer"
1018 },
1019 {
1020 "include": "#access-modifier"
1021 },
1022 {
1023 "include": "#property-accessor"
1024 },
1025 {
1026 "include": "#expression"
1027 },
1028 {
1029 "include": "#punctuation-comma"
1030 },
1031 {
1032 "include": "#punctuation-semicolon"
1033 }
1034 ]
1035 },
1036 "type-object": {
1037 "name": "meta.object.type.js",
1038 "begin": "\\{",
1039 "beginCaptures": {
1040 "0": {
1041 "name": "punctuation.definition.block.js"
1042 }
1043 },
1044 "end": "\\}",
1045 "endCaptures": {
1046 "0": {
1047 "name": "punctuation.definition.block.js"
1048 }
1049 },
1050 "patterns": [
1051 {
1052 "include": "#type-object-members"
1053 }
1054 ]
1055 },
1056 "type-object-members": {
1057 "patterns": [
1058 {
1059 "include": "#comment"
1060 },
1061 {
1062 "include": "#method-declaration"
1063 },
1064 {
1065 "include": "#indexer-declaration"
1066 },
1067 {
1068 "include": "#field-declaration"
1069 },
1070 {
1071 "include": "#type-annotation"
1072 },
1073 {
1074 "begin": "\\.\\.\\.",
1075 "beginCaptures": {
1076 "0": {
1077 "name": "keyword.operator.spread.js"
1078 }
1079 },
1080 "end": "(?=\\}|;|,|$)|(?<=\\})",
1081 "patterns": [
1082 {
1083 "include": "#type"
1084 }
1085 ]
1086 },
1087 {
1088 "include": "#punctuation-comma"
1089 },
1090 {
1091 "include": "#punctuation-semicolon"
1092 }
1093 ]
1094 },
1095 "field-declaration": {
1096 "name": "meta.field.declaration.js",
1097 "begin": "(?<!\\()(?:(?<!\\.|\\$)\\b(readonly)\\s+)?(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(\\?\\s*)?(=|:))",
1098 "beginCaptures": {
1099 "1": {
1100 "name": "storage.modifier.js"
1101 }
1102 },
1103 "end": "(?=\\}|;|,|$)|(?<=\\})",
1104 "patterns": [
1105 {
1106 "include": "#variable-initializer"
1107 },
1108 {
1109 "begin": "(?=((?:[_$[:alpha:]][_$[:alnum:]]*)|(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(\\?\\s*)?(=|:))",
1110 "end": "(?=[};,=]|$)|(?<=\\})",
1111 "patterns": [
1112 {
1113 "include": "#type-annotation"
1114 },
1115 {
1116 "include": "#string"
1117 },
1118 {
1119 "include": "#array-literal"
1120 },
1121 {
1122 "include": "#comment"
1123 },
1124 {
1125 "name": "entity.name.function.js",
1126 "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s* (=\\s*( (async\\s+) | (function\\s*[(<]) | (function\\s+) | ([_$[:alpha:]][_$[:alnum:]]*\\s*=>) | ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)) ) | (:\\s*( (<) | ([(]\\s*( ([)]) | (\\.\\.\\.) | ([_$[:alnum:]]+\\s*( ([:,?=])| ([)]\\s*=>) )) ))) ))"
1127 },
1128 {
1129 "name": "variable.object.property.js",
1130 "match": "[_$[:alpha:]][_$[:alnum:]]*"
1131 },
1132 {
1133 "name": "keyword.operator.optional.js",
1134 "match": "\\?"
1135 }
1136 ]
1137 }
1138 ]
1139 },
1140 "method-declaration": {
1141 "name": "meta.method.declaration.js",
1142 "begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(\\??))?\\s*[\\(\\<]))",
1143 "beginCaptures": {
1144 "1": {
1145 "name": "storage.modifier.js"
1146 },
1147 "2": {
1148 "name": "storage.modifier.js"
1149 },
1150 "3": {
1151 "name": "storage.modifier.async.js"
1152 },
1153 "4": {
1154 "name": "storage.type.property.js"
1155 },
1156 "5": {
1157 "name": "keyword.operator.new.js"
1158 },
1159 "6": {
1160 "name": "storage.type.js"
1161 },
1162 "7": {
1163 "name": "keyword.generator.asterisk.js"
1164 }
1165 },
1166 "end": "(?=\\}|;|,)|(?<=\\})",
1167 "patterns": [
1168 {
1169 "include": "#method-declaration-name"
1170 },
1171 {
1172 "include": "#comment"
1173 },
1174 {
1175 "include": "#type-parameters"
1176 },
1177 {
1178 "include": "#function-parameters"
1179 },
1180 {
1181 "include": "#return-type"
1182 },
1183 {
1184 "include": "#method-overload-declaration"
1185 },
1186 {
1187 "include": "#decl-block"
1188 }
1189 ]
1190 },
1191 "method-overload-declaration": {
1192 "begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(\\??))?\\s*[\\(\\<]))",
1193 "beginCaptures": {
1194 "1": {
1195 "name": "storage.modifier.js"
1196 },
1197 "2": {
1198 "name": "storage.modifier.js"
1199 },
1200 "3": {
1201 "name": "storage.modifier.async.js"
1202 },
1203 "4": {
1204 "name": "storage.type.property.js"
1205 },
1206 "5": {
1207 "name": "keyword.operator.new.js"
1208 },
1209 "6": {
1210 "name": "storage.type.js"
1211 },
1212 "7": {
1213 "name": "keyword.generator.asterisk.js"
1214 }
1215 },
1216 "end": "(?=\\(|\\<)",
1217 "patterns": [
1218 {
1219 "include": "#method-declaration-name"
1220 }
1221 ]
1222 },
1223 "method-declaration-name": {
1224 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(\\??)\\s*[\\(\\<])",
1225 "end": "(?=\\(|\\<)",
1226 "patterns": [
1227 {
1228 "include": "#string"
1229 },
1230 {
1231 "include": "#array-literal"
1232 },
1233 {
1234 "name": "entity.name.function.js",
1235 "match": "[_$[:alpha:]][_$[:alnum:]]*"
1236 },
1237 {
1238 "name": "keyword.operator.optional.js",
1239 "match": "\\?"
1240 }
1241 ]
1242 },
1243 "indexer-declaration": {
1244 "name": "meta.indexer.declaration.js",
1245 "begin": "(?:(?<!\\.|\\$)\\b(readonly)\\s*)?(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:)",
1246 "beginCaptures": {
1247 "1": {
1248 "name": "storage.modifier.js"
1249 },
1250 "2": {
1251 "name": "meta.brace.square.js"
1252 },
1253 "3": {
1254 "name": "variable.parameter.js"
1255 }
1256 },
1257 "end": "(\\])\\s*(\\?\\s*)?|$",
1258 "endCaptures": {
1259 "1": {
1260 "name": "meta.brace.square.js"
1261 },
1262 "2": {
1263 "name": "keyword.operator.optional.js"
1264 }
1265 },
1266 "patterns": [
1267 {
1268 "include": "#type-annotation"
1269 }
1270 ]
1271 },
1272 "function-declaration": {
1273 "name": "meta.function.js",
1274 "begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
1275 "beginCaptures": {
1276 "1": {
1277 "name": "keyword.control.export.js"
1278 },
1279 "2": {
1280 "name": "storage.modifier.async.js"
1281 },
1282 "3": {
1283 "name": "storage.type.function.js"
1284 },
1285 "4": {
1286 "name": "keyword.generator.asterisk.js"
1287 },
1288 "5": {
1289 "name": "entity.name.function.js"
1290 }
1291 },
1292 "end": "(?=;|\\})|(?<=\\})",
1293 "patterns": [
1294 {
1295 "include": "#comment"
1296 },
1297 {
1298 "include": "#type-parameters"
1299 },
1300 {
1301 "include": "#function-parameters"
1302 },
1303 {
1304 "include": "#return-type"
1305 },
1306 {
1307 "include": "#function-overload-declaration"
1308 },
1309 {
1310 "include": "#decl-block"
1311 }
1312 ]
1313 },
1314 "function-overload-declaration": {
1315 "name": "meta.function.overload.js",
1316 "match": "(?<!\\.|\\$)\\b(?:(export)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
1317 "captures": {
1318 "1": {
1319 "name": "keyword.control.export.js"
1320 },
1321 "2": {
1322 "name": "storage.modifier.async.js"
1323 },
1324 "3": {
1325 "name": "storage.type.function.js"
1326 },
1327 "4": {
1328 "name": "keyword.generator.asterisk.js"
1329 },
1330 "5": {
1331 "name": "entity.name.function.js"
1332 }
1333 }
1334 },
1335 "object-literal": {
1336 "name": "meta.objectliteral.js",
1337 "begin": "\\{",
1338 "beginCaptures": {
1339 "0": {
1340 "name": "punctuation.definition.block.js"
1341 }
1342 },
1343 "end": "\\}",
1344 "endCaptures": {
1345 "0": {
1346 "name": "punctuation.definition.block.js"
1347 }
1348 },
1349 "patterns": [
1350 {
1351 "include": "#object-member"
1352 }
1353 ]
1354 },
1355 "decl-block": {
1356 "name": "meta.block.js",
1357 "begin": "\\{",
1358 "beginCaptures": {
1359 "0": {
1360 "name": "punctuation.definition.block.js"
1361 }
1362 },
1363 "end": "\\}",
1364 "endCaptures": {
1365 "0": {
1366 "name": "punctuation.definition.block.js"
1367 }
1368 },
1369 "patterns": [
1370 {
1371 "include": "#statements"
1372 }
1373 ]
1374 },
1375 "after-operator-block": {
1376 "name": "meta.objectliteral.js",
1377 "begin": "(?<=[=(,\\[?+!]|await|return|yield|throw|in|of|typeof|&&|\\|\\||\\*)\\s*(\\{)",
1378 "beginCaptures": {
1379 "1": {
1380 "name": "punctuation.definition.block.js"
1381 }
1382 },
1383 "end": "\\}",
1384 "endCaptures": {
1385 "0": {
1386 "name": "punctuation.definition.block.js"
1387 }
1388 },
1389 "patterns": [
1390 {
1391 "include": "#object-member"
1392 }
1393 ]
1394 },
1395 "parameter-name": {
1396 "patterns": [
1397 {
1398 "match": "(?x)(?:\\s*\\b(readonly)\\s+)?(?:\\s*\\b(public|private|protected)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\??)(?=\\s* (=\\s*( (async\\s+) | (function\\s*[(<]) | (function\\s+) | ([_$[:alpha:]][_$[:alnum:]]*\\s*=>) | ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)) ) | (:\\s*( (<) | ([(]\\s*( ([)]) | (\\.\\.\\.) | ([_$[:alnum:]]+\\s*( ([:,?=])| ([)]\\s*=>) )) ))) ))",
1399 "captures": {
1400 "1": {
1401 "name": "storage.modifier.js"
1402 },
1403 "2": {
1404 "name": "storage.modifier.js"
1405 },
1406 "3": {
1407 "name": "keyword.operator.rest.js"
1408 },
1409 "4": {
1410 "name": "entity.name.function.js"
1411 },
1412 "5": {
1413 "name": "keyword.operator.optional.js"
1414 }
1415 }
1416 },
1417 {
1418 "match": "(?:\\s*\\b(readonly)\\s+)?(?:\\s*\\b(public|private|protected)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\??)",
1419 "captures": {
1420 "1": {
1421 "name": "storage.modifier.js"
1422 },
1423 "2": {
1424 "name": "storage.modifier.js"
1425 },
1426 "3": {
1427 "name": "keyword.operator.rest.js"
1428 },
1429 "4": {
1430 "name": "variable.parameter.js"
1431 },
1432 "5": {
1433 "name": "keyword.operator.optional.js"
1434 }
1435 }
1436 }
1437 ]
1438 },
1439 "destructuring-parameter": {
1440 "patterns": [
1441 {
1442 "name": "meta.parameter.object-binding-pattern.js",
1443 "begin": "(?<!=|:)\\s*(\\{)",
1444 "beginCaptures": {
1445 "1": {
1446 "name": "punctuation.definition.binding-pattern.object.js"
1447 }
1448 },
1449 "end": "\\}",
1450 "endCaptures": {
1451 "0": {
1452 "name": "punctuation.definition.binding-pattern.object.js"
1453 }
1454 },
1455 "patterns": [
1456 {
1457 "include": "#parameter-object-binding-element"
1458 }
1459 ]
1460 },
1461 {
1462 "name": "meta.paramter.array-binding-pattern.js",
1463 "begin": "(?<!=|:)\\s*(\\[)",
1464 "beginCaptures": {
1465 "1": {
1466 "name": "punctuation.definition.binding-pattern.array.js"
1467 }
1468 },
1469 "end": "\\]",
1470 "endCaptures": {
1471 "0": {
1472 "name": "punctuation.definition.binding-pattern.array.js"
1473 }
1474 },
1475 "patterns": [
1476 {
1477 "include": "#parameter-binding-element"
1478 },
1479 {
1480 "include": "#punctuation-comma"
1481 }
1482 ]
1483 }
1484 ]
1485 },
1486 "parameter-object-binding-element": {
1487 "patterns": [
1488 {
1489 "include": "#comment"
1490 },
1491 {
1492 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(:))",
1493 "end": "(?=,|\\})",
1494 "patterns": [
1495 {
1496 "include": "#object-binding-element-propertyName"
1497 },
1498 {
1499 "include": "#parameter-binding-element"
1500 }
1501 ]
1502 },
1503 {
1504 "include": "#parameter-object-binding-pattern"
1505 },
1506 {
1507 "include": "#destructuring-parameter-rest"
1508 },
1509 {
1510 "include": "#variable-initializer"
1511 },
1512 {
1513 "include": "#punctuation-comma"
1514 }
1515 ]
1516 },
1517 "parameter-binding-element": {
1518 "patterns": [
1519 {
1520 "include": "#comment"
1521 },
1522 {
1523 "include": "#parameter-object-binding-pattern"
1524 },
1525 {
1526 "include": "#parameter-array-binding-pattern"
1527 },
1528 {
1529 "include": "#destructuring-parameter-rest"
1530 },
1531 {
1532 "include": "#variable-initializer"
1533 }
1534 ]
1535 },
1536 "destructuring-parameter-rest": {
1537 "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
1538 "captures": {
1539 "1": {
1540 "name": "keyword.operator.rest.js"
1541 },
1542 "2": {
1543 "name": "variable.parameter.js"
1544 }
1545 }
1546 },
1547 "parameter-object-binding-pattern": {
1548 "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
1549 "beginCaptures": {
1550 "1": {
1551 "name": "keyword.operator.rest.js"
1552 },
1553 "2": {
1554 "name": "punctuation.definition.binding-pattern.object.js"
1555 }
1556 },
1557 "end": "\\}",
1558 "endCaptures": {
1559 "0": {
1560 "name": "punctuation.definition.binding-pattern.object.js"
1561 }
1562 },
1563 "patterns": [
1564 {
1565 "include": "#parameter-object-binding-element"
1566 }
1567 ]
1568 },
1569 "parameter-array-binding-pattern": {
1570 "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
1571 "beginCaptures": {
1572 "1": {
1573 "name": "keyword.operator.rest.js"
1574 },
1575 "2": {
1576 "name": "punctuation.definition.binding-pattern.array.js"
1577 }
1578 },
1579 "end": "\\]",
1580 "endCaptures": {
1581 "0": {
1582 "name": "punctuation.definition.binding-pattern.array.js"
1583 }
1584 },
1585 "patterns": [
1586 {
1587 "include": "#parameter-binding-element"
1588 },
1589 {
1590 "include": "#punctuation-comma"
1591 }
1592 ]
1593 },
1594 "return-type": {
1595 "name": "meta.return.type.js",
1596 "begin": "(?<=\\))\\s*(:)",
1597 "beginCaptures": {
1598 "1": {
1599 "name": "keyword.operator.type.annotation.js"
1600 }
1601 },
1602 "end": "(?<!:)((?=$)|(?=\\{|;|//|\\}))",
1603 "patterns": [
1604 {
1605 "include": "#comment"
1606 },
1607 {
1608 "name": "meta.object.type.js",
1609 "begin": "(?<=:)\\s*(\\{)",
1610 "beginCaptures": {
1611 "1": {
1612 "name": "punctuation.definition.block.js"
1613 }
1614 },
1615 "end": "\\}",
1616 "endCaptures": {
1617 "0": {
1618 "name": "punctuation.definition.block.js"
1619 }
1620 },
1621 "patterns": [
1622 {
1623 "include": "#type-object-members"
1624 }
1625 ]
1626 },
1627 {
1628 "include": "#type-predicate-operator"
1629 },
1630 {
1631 "include": "#type"
1632 }
1633 ]
1634 },
1635 "type-predicate-operator": {
1636 "name": "keyword.operator.expression.is.js",
1637 "match": "(?<!\\.|\\$)\\bis\\b(?!\\$)"
1638 },
1639 "type-annotation": {
1640 "name": "meta.type.annotation.js",
1641 "begin": ":",
1642 "beginCaptures": {
1643 "0": {
1644 "name": "keyword.operator.type.annotation.js"
1645 }
1646 },
1647 "end": "(?=$|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)",
1648 "patterns": [
1649 {
1650 "include": "#comment"
1651 },
1652 {
1653 "include": "#type"
1654 }
1655 ]
1656 },
1657 "type": {
1658 "name": "meta.type.js",
1659 "patterns": [
1660 {
1661 "include": "#comment"
1662 },
1663 {
1664 "include": "#string"
1665 },
1666 {
1667 "include": "#numeric-literal"
1668 },
1669 {
1670 "include": "#type-primitive"
1671 },
1672 {
1673 "include": "#type-builtin-literals"
1674 },
1675 {
1676 "include": "#type-parameters"
1677 },
1678 {
1679 "include": "#type-tuple"
1680 },
1681 {
1682 "include": "#type-object"
1683 },
1684 {
1685 "include": "#type-operators"
1686 },
1687 {
1688 "include": "#type-fn-type-parameters"
1689 },
1690 {
1691 "include": "#type-paren-or-function-parameters"
1692 },
1693 {
1694 "include": "#type-function-return-type"
1695 },
1696 {
1697 "include": "#type-name"
1698 }
1699 ]
1700 },
1701 "function-parameters": {
1702 "name": "meta.parameters.js",
1703 "begin": "\\(",
1704 "beginCaptures": {
1705 "0": {
1706 "name": "punctuation.definition.parameters.begin.js"
1707 }
1708 },
1709 "end": "\\)",
1710 "endCaptures": {
1711 "0": {
1712 "name": "punctuation.definition.parameters.end.js"
1713 }
1714 },
1715 "patterns": [
1716 {
1717 "include": "#comment"
1718 },
1719 {
1720 "include": "#decorator"
1721 },
1722 {
1723 "include": "#destructuring-parameter"
1724 },
1725 {
1726 "include": "#parameter-name"
1727 },
1728 {
1729 "include": "#type-annotation"
1730 },
1731 {
1732 "include": "#variable-initializer"
1733 },
1734 {
1735 "name": "punctuation.separator.parameter.js",
1736 "match": ","
1737 }
1738 ]
1739 },
1740 "type-primitive": {
1741 "name": "support.type.primitive.js",
1742 "match": "(?<!\\.|\\$)\\b(string|number|boolean|symbol|any|void|never)\\b(?!\\$)"
1743 },
1744 "type-builtin-literals": {
1745 "name": "support.type.builtin.js",
1746 "match": "(?<!\\.|\\$)\\b(this|true|false|undefined|null)\\b(?!\\$)"
1747 },
1748 "type-paren-or-function-parameters": {
1749 "name": "meta.type.paren.cover.js",
1750 "begin": "\\(",
1751 "beginCaptures": {
1752 "0": {
1753 "name": "meta.brace.round.js"
1754 }
1755 },
1756 "end": "\\)",
1757 "endCaptures": {
1758 "0": {
1759 "name": "meta.brace.round.js"
1760 }
1761 },
1762 "patterns": [
1763 {
1764 "include": "#type"
1765 },
1766 {
1767 "include": "#function-parameters"
1768 }
1769 ]
1770 },
1771 "type-fn-type-parameters": {
1772 "patterns": [
1773 {
1774 "name": "meta.type.constructor.js",
1775 "match": "(?<!\\.|\\$)\\b(new)\\b(?=\\s*\\<)",
1776 "captures": {
1777 "1": {
1778 "name": "keyword.control.new.js"
1779 }
1780 }
1781 },
1782 {
1783 "name": "meta.type.constructor.js",
1784 "begin": "(?<!\\.|\\$)\\b(new)\\b\\s*(?=\\()",
1785 "beginCaptures": {
1786 "1": {
1787 "name": "keyword.control.new.js"
1788 }
1789 },
1790 "end": "(?<=\\))",
1791 "patterns": [
1792 {
1793 "include": "#function-parameters"
1794 }
1795 ]
1796 },
1797 {
1798 "name": "meta.type.function.js",
1799 "begin": "(?<=\\>)\\s*(?=\\()",
1800 "end": "(?<=\\))",
1801 "patterns": [
1802 {
1803 "include": "#function-parameters"
1804 }
1805 ]
1806 },
1807 {
1808 "name": "meta.type.function.js",
1809 "begin": "(?x)( (?= [(]\\s*( ([)]) | (\\.\\.\\.) | ([_$[:alnum:]]+\\s*( ([:,?=])| ([)]\\s*=>) )) ) ) )",
1810 "end": "(?<=\\))",
1811 "patterns": [
1812 {
1813 "include": "#function-parameters"
1814 }
1815 ]
1816 }
1817 ]
1818 },
1819 "type-operators": {
1820 "patterns": [
1821 {
1822 "include": "#typeof-operator"
1823 },
1824 {
1825 "name": "keyword.operator.type.js",
1826 "match": "[&|]"
1827 },
1828 {
1829 "name": "keyword.operator.expression.keyof.js",
1830 "match": "(?<!\\.|\\$)\\bkeyof\\b(?!\\$)"
1831 }
1832 ]
1833 },
1834 "type-function-return-type": {
1835 "name": "meta.type.function.return.js",
1836 "begin": "=>",
1837 "beginCaptures": {
1838 "0": {
1839 "name": "storage.type.function.arrow.js"
1840 }
1841 },
1842 "end": "(?<!=>)(?=[,\\]\\)\\{\\}=;>]|//|$)",
1843 "patterns": [
1844 {
1845 "include": "#comment"
1846 },
1847 {
1848 "name": "meta.object.type.js",
1849 "begin": "(?<==>)\\s*(\\{)",
1850 "beginCaptures": {
1851 "1": {
1852 "name": "punctuation.definition.block.js"
1853 }
1854 },
1855 "end": "\\}",
1856 "endCaptures": {
1857 "0": {
1858 "name": "punctuation.definition.block.js"
1859 }
1860 },
1861 "patterns": [
1862 {
1863 "include": "#type-object-members"
1864 }
1865 ]
1866 },
1867 {
1868 "include": "#type-predicate-operator"
1869 },
1870 {
1871 "include": "#type"
1872 }
1873 ]
1874 },
1875 "type-tuple": {
1876 "name": "meta.type.tuple.js",
1877 "begin": "\\[",
1878 "beginCaptures": {
1879 "0": {
1880 "name": "meta.brace.square.js"
1881 }
1882 },
1883 "end": "\\]",
1884 "endCaptures": {
1885 "0": {
1886 "name": "meta.brace.square.js"
1887 }
1888 },
1889 "patterns": [
1890 {
1891 "include": "#type"
1892 },
1893 {
1894 "include": "#punctuation-comma"
1895 }
1896 ]
1897 },
1898 "type-name": {
1899 "patterns": [
1900 {
1901 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)",
1902 "captures": {
1903 "1": {
1904 "name": "entity.name.type.module.js"
1905 },
1906 "2": {
1907 "name": "punctuation.accessor.js"
1908 }
1909 }
1910 },
1911 {
1912 "name": "entity.name.type.js",
1913 "match": "[_$[:alpha:]][_$[:alnum:]]*"
1914 }
1915 ]
1916 },
1917 "type-parameters": {
1918 "name": "meta.type.parameters.js",
1919 "begin": "(<)",
1920 "beginCaptures": {
1921 "1": {
1922 "name": "punctuation.definition.typeparameters.begin.js"
1923 }
1924 },
1925 "end": "(?=$)|(>)",
1926 "endCaptures": {
1927 "1": {
1928 "name": "punctuation.definition.typeparameters.end.js"
1929 }
1930 },
1931 "patterns": [
1932 {
1933 "include": "#comment"
1934 },
1935 {
1936 "name": "storage.modifier.js",
1937 "match": "(?<!\\.|\\$)\\b(extends)\\b(?!\\$)"
1938 },
1939 {
1940 "include": "#type"
1941 },
1942 {
1943 "include": "#punctuation-comma"
1944 }
1945 ]
1946 },
1947 "variable-initializer": {
1948 "begin": "(?<!=|!)(=)(?!=)",
1949 "beginCaptures": {
1950 "1": {
1951 "name": "keyword.operator.assignment.js"
1952 }
1953 },
1954 "end": "(?=$|[,);}\\]])",
1955 "patterns": [
1956 {
1957 "include": "#expression"
1958 }
1959 ]
1960 },
1961 "for-loop": {
1962 "begin": "(?<!\\.|\\$)\\b(for)\\s*(\\()",
1963 "beginCaptures": {
1964 "1": {
1965 "name": "keyword.control.loop.js"
1966 },
1967 "2": {
1968 "name": "meta.brace.round.js"
1969 }
1970 },
1971 "end": "\\)",
1972 "endCaptures": {
1973 "0": {
1974 "name": "meta.brace.round.js"
1975 }
1976 },
1977 "patterns": [
1978 {
1979 "include": "#var-expr"
1980 },
1981 {
1982 "include": "#expression"
1983 },
1984 {
1985 "include": "#punctuation-semicolon"
1986 }
1987 ]
1988 },
1989 "switch-expression": {
1990 "name": "switch-expression.expr.js",
1991 "begin": "(?<!\\.|\\$)\\b(switch)\\s*(\\()",
1992 "beginCaptures": {
1993 "1": {
1994 "name": "keyword.control.switch.js"
1995 },
1996 "2": {
1997 "name": "meta.brace.round.js"
1998 }
1999 },
2000 "end": "\\)",
2001 "endCaptures": {
2002 "0": {
2003 "name": "meta.brace.round.js"
2004 }
2005 },
2006 "patterns": [
2007 {
2008 "include": "#expression"
2009 }
2010 ]
2011 },
2012 "switch-block": {
2013 "name": "switch-block.expr.js",
2014 "begin": "{",
2015 "beginCaptures": {
2016 "0": {
2017 "name": "punctuation.definition.block.js"
2018 }
2019 },
2020 "end": "(?=\\})",
2021 "patterns": [
2022 {
2023 "include": "#case-clause"
2024 },
2025 {
2026 "include": "#statements"
2027 }
2028 ]
2029 },
2030 "case-clause": {
2031 "name": "case-clause.expr.js",
2032 "begin": "(?<!\\.|\\$)\\b(case|default(?=:))\\b(?!\\$)",
2033 "beginCaptures": {
2034 "1": {
2035 "name": "keyword.control.switch.js"
2036 }
2037 },
2038 "end": ":",
2039 "endCaptures": {
2040 "0": {
2041 "name": "punctuation.definition.section.case-statement.js"
2042 }
2043 },
2044 "patterns": [
2045 {
2046 "include": "#expression"
2047 }
2048 ]
2049 },
2050 "switch-statement": {
2051 "name": "switch-statement.expr.js",
2052 "begin": "(?<!\\.|\\$)(?=\\bswitch\\s*\\()",
2053 "end": "}",
2054 "endCaptures": {
2055 "0": {
2056 "name": "punctuation.definition.block.js"
2057 }
2058 },
2059 "patterns": [
2060 {
2061 "include": "#switch-expression"
2062 },
2063 {
2064 "include": "#switch-block"
2065 }
2066 ]
2067 },
2068 "support-objects": {
2069 "patterns": [
2070 {
2071 "name": "variable.language.arguments.js",
2072 "match": "(?<!\\.|\\$)\\b(arguments)\\b(?!\\$)"
2073 },
2074 {
2075 "name": "support.class.builtin.js",
2076 "match": "(?x)(?<!\\.|\\$)\\b(Array|ArrayBuffer|Atomics|Boolean|DataView|Date|Float32Array|Float64Array|Function|Generator |GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Promise|Proxy |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\\b(?!\\$)"
2077 },
2078 {
2079 "name": "support.class.error.js",
2080 "match": "(?<!\\.|\\$)\\b((Eval|Internal|Range|Reference|Syntax|Type|URI)?Error)\\b(?!\\$)"
2081 },
2082 {
2083 "name": "support.function.js",
2084 "match": "(?x)(?<!\\.|\\$)\\b(clear(Interval|Timeout)|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval| isFinite|isNaN|parseFloat|parseInt|require|set(Interval|Timeout)|super|unescape|uneval)(?=\\s*\\()"
2085 },
2086 {
2087 "match": "(?x)(?<!\\.|\\$)\\b(Math)(?:\\s*(\\.)\\s*(?:\n (abs|acos|acosh|asin|asinh|atan|atan2|atanh|cbrt|ceil|clz32|cos|cosh|exp|\n expm1|floor|fround|hypot|imul|log|log10|log1p|log2|max|min|pow|random|\n round|sign|sin|sinh|sqrt|tan|tanh|trunc)\n |\n (E|LN10|LN2|LOG10E|LOG2E|PI|SQRT1_2|SQRT2)))?\\b(?!\\$)",
2088 "captures": {
2089 "1": {
2090 "name": "support.constant.math.js"
2091 },
2092 "2": {
2093 "name": "punctuation.accessor.js"
2094 },
2095 "3": {
2096 "name": "support.function.math.js"
2097 },
2098 "4": {
2099 "name": "support.constant.property.math.js"
2100 }
2101 }
2102 },
2103 {
2104 "match": "(?x)(?<!\\.|\\$)\\b(console)(?:\\s*(\\.)\\s*(\n assert|clear|count|debug|dir|error|group|groupCollapsed|groupEnd|info|log\n |profile|profileEnd|table|time|timeEnd|timeStamp|trace|warn))?\\b(?!\\$)",
2105 "captures": {
2106 "1": {
2107 "name": "support.class.console.js"
2108 },
2109 "2": {
2110 "name": "punctuation.accessor.js"
2111 },
2112 "3": {
2113 "name": "support.function.console.js"
2114 }
2115 }
2116 },
2117 {
2118 "match": "(?<!\\.|\\$)\\b(JSON)(?:\\s*(\\.)\\s*(parse|stringify))?\\b(?!\\$)",
2119 "captures": {
2120 "1": {
2121 "name": "support.constant.json.js"
2122 },
2123 "2": {
2124 "name": "punctuation.accessor.js"
2125 },
2126 "3": {
2127 "name": "support.function.json.js"
2128 }
2129 }
2130 },
2131 {
2132 "match": "(?x) (\\.) \\s* (?:\n (constructor|length|prototype|__proto__) \n |\n (EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY))\\b(?!\\$)",
2133 "captures": {
2134 "1": {
2135 "name": "punctuation.accessor.js"
2136 },
2137 "2": {
2138 "name": "support.variable.property.js"
2139 },
2140 "3": {
2141 "name": "support.constant.js"
2142 }
2143 }
2144 },
2145 {
2146 "match": "(?x) (?<!\\.|\\$) \\b (?:\n (document|event|navigator|performance|screen|window) \n |\n (AnalyserNode|ArrayBufferView|Attr|AudioBuffer|AudioBufferSourceNode|AudioContext|AudioDestinationNode|AudioListener\n |AudioNode|AudioParam|BatteryManager|BeforeUnloadEvent|BiquadFilterNode|Blob|BufferSource|ByteString|CSS|CSSConditionRule\n |CSSCounterStyleRule|CSSGroupingRule|CSSMatrix|CSSMediaRule|CSSPageRule|CSSPrimitiveValue|CSSRule|CSSRuleList|CSSStyleDeclaration\n |CSSStyleRule|CSSStyleSheet|CSSSupportsRule|CSSValue|CSSValueList|CanvasGradient|CanvasImageSource|CanvasPattern\n |CanvasRenderingContext2D|ChannelMergerNode|ChannelSplitterNode|CharacterData|ChromeWorker|CloseEvent|Comment|CompositionEvent\n |Console|ConvolverNode|Coordinates|Credential|CredentialsContainer|Crypto|CryptoKey|CustomEvent|DOMError|DOMException\n |DOMHighResTimeStamp|DOMImplementation|DOMString|DOMStringList|DOMStringMap|DOMTimeStamp|DOMTokenList|DataTransfer\n |DataTransferItem|DataTransferItemList|DedicatedWorkerGlobalScope|DelayNode|DeviceProximityEvent|DirectoryEntry\n |DirectoryEntrySync|DirectoryReader|DirectoryReaderSync|Document|DocumentFragment|DocumentTouch|DocumentType|DragEvent\n |DynamicsCompressorNode|Element|Entry|EntrySync|ErrorEvent|Event|EventListener|EventSource|EventTarget|FederatedCredential\n |FetchEvent|File|FileEntry|FileEntrySync|FileException|FileList|FileReader|FileReaderSync|FileSystem|FileSystemSync\n |FontFace|FormData|GainNode|Gamepad|GamepadButton|GamepadEvent|Geolocation|GlobalEventHandlers|HTMLAnchorElement\n |HTMLAreaElement|HTMLAudioElement|HTMLBRElement|HTMLBaseElement|HTMLBodyElement|HTMLButtonElement|HTMLCanvasElement\n |HTMLCollection|HTMLContentElement|HTMLDListElement|HTMLDataElement|HTMLDataListElement|HTMLDialogElement|HTMLDivElement\n |HTMLDocument|HTMLElement|HTMLEmbedElement|HTMLFieldSetElement|HTMLFontElement|HTMLFormControlsCollection|HTMLFormElement\n |HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLIFrameElement|HTMLImageElement|HTMLInputElement\n |HTMLKeygenElement|HTMLLIElement|HTMLLabelElement|HTMLLegendElement|HTMLLinkElement|HTMLMapElement|HTMLMediaElement\n |HTMLMetaElement|HTMLMeterElement|HTMLModElement|HTMLOListElement|HTMLObjectElement|HTMLOptGroupElement|HTMLOptionElement\n |HTMLOptionsCollection|HTMLOutputElement|HTMLParagraphElement|HTMLParamElement|HTMLPreElement|HTMLProgressElement\n |HTMLQuoteElement|HTMLScriptElement|HTMLSelectElement|HTMLShadowElement|HTMLSourceElement|HTMLSpanElement|HTMLStyleElement\n |HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableElement|HTMLTableHeaderCellElement\n |HTMLTableRowElement|HTMLTableSectionElement|HTMLTextAreaElement|HTMLTimeElement|HTMLTitleElement|HTMLTrackElement\n |HTMLUListElement|HTMLUnknownElement|HTMLVideoElement|HashChangeEvent|History|IDBCursor|IDBCursorWithValue|IDBDatabase\n |IDBEnvironment|IDBFactory|IDBIndex|IDBKeyRange|IDBMutableFile|IDBObjectStore|IDBOpenDBRequest|IDBRequest|IDBTransaction\n |IDBVersionChangeEvent|IIRFilterNode|IdentityManager|ImageBitmap|ImageBitmapFactories|ImageData|Index|InputDeviceCapabilities\n |InputEvent|InstallEvent|InstallTrigger|KeyboardEvent|LinkStyle|LocalFileSystem|LocalFileSystemSync|Location|MIDIAccess\n |MIDIConnectionEvent|MIDIInput|MIDIInputMap|MIDIOutputMap|MediaElementAudioSourceNode|MediaError|MediaKeyMessageEvent\n |MediaKeySession|MediaKeyStatusMap|MediaKeySystemAccess|MediaKeySystemConfiguration|MediaKeys|MediaRecorder|MediaStream\n |MediaStreamAudioDestinationNode|MediaStreamAudioSourceNode|MessageChannel|MessageEvent|MessagePort|MouseEvent\n |MutationObserver|MutationRecord|NamedNodeMap|Navigator|NavigatorConcurrentHardware|NavigatorGeolocation|NavigatorID\n |NavigatorLanguage|NavigatorOnLine|Node|NodeFilter|NodeIterator|NodeList|NonDocumentTypeChildNode|Notification\n |OfflineAudioCompletionEvent|OfflineAudioContext|OscillatorNode|PageTransitionEvent|PannerNode|ParentNode|PasswordCredential\n |Path2D|PaymentAddress|PaymentRequest|PaymentResponse|Performance|PerformanceEntry|PerformanceFrameTiming|PerformanceMark\n |PerformanceMeasure|PerformanceNavigation|PerformanceNavigationTiming|PerformanceObserver|PerformanceObserverEntryList\n |PerformanceResourceTiming|PerformanceTiming|PeriodicSyncEvent|PeriodicWave|Plugin|Point|PointerEvent|PopStateEvent\n |PortCollection|Position|PositionError|PositionOptions|PresentationConnectionClosedEvent|PresentationConnectionList\n |PresentationReceiver|ProcessingInstruction|ProgressEvent|PromiseRejectionEvent|PushEvent|PushRegistrationManager\n |RTCCertificate|RTCConfiguration|RTCPeerConnection|RTCSessionDescriptionCallback|RTCStatsReport|RadioNodeList|RandomSource\n |Range|ReadableByteStream|RenderingContext|SVGAElement|SVGAngle|SVGAnimateColorElement|SVGAnimateElement|SVGAnimateMotionElement\n |SVGAnimateTransformElement|SVGAnimatedAngle|SVGAnimatedBoolean|SVGAnimatedEnumeration|SVGAnimatedInteger|SVGAnimatedLength\n |SVGAnimatedLengthList|SVGAnimatedNumber|SVGAnimatedNumberList|SVGAnimatedPoints|SVGAnimatedPreserveAspectRatio\n |SVGAnimatedRect|SVGAnimatedString|SVGAnimatedTransformList|SVGAnimationElement|SVGCircleElement|SVGClipPathElement\n |SVGCursorElement|SVGDefsElement|SVGDescElement|SVGElement|SVGEllipseElement|SVGEvent|SVGFilterElement|SVGFontElement\n |SVGFontFaceElement|SVGFontFaceFormatElement|SVGFontFaceNameElement|SVGFontFaceSrcElement|SVGFontFaceUriElement\n |SVGForeignObjectElement|SVGGElement|SVGGlyphElement|SVGGradientElement|SVGHKernElement|SVGImageElement|SVGLength\n |SVGLengthList|SVGLineElement|SVGLinearGradientElement|SVGMPathElement|SVGMaskElement|SVGMatrix|SVGMissingGlyphElement\n |SVGNumber|SVGNumberList|SVGPathElement|SVGPatternElement|SVGPoint|SVGPolygonElement|SVGPolylineElement|SVGPreserveAspectRatio\n |SVGRadialGradientElement|SVGRect|SVGRectElement|SVGSVGElement|SVGScriptElement|SVGSetElement|SVGStopElement|SVGStringList\n |SVGStylable|SVGStyleElement|SVGSwitchElement|SVGSymbolElement|SVGTRefElement|SVGTSpanElement|SVGTests|SVGTextElement\n |SVGTextPositioningElement|SVGTitleElement|SVGTransform|SVGTransformList|SVGTransformable|SVGUseElement|SVGVKernElement\n |SVGViewElement|ServiceWorker|ServiceWorkerContainer|ServiceWorkerGlobalScope|ServiceWorkerRegistration|ServiceWorkerState\n |ShadowRoot|SharedWorker|SharedWorkerGlobalScope|SourceBufferList|StereoPannerNode|Storage|StorageEvent|StyleSheet\n |StyleSheetList|SubtleCrypto|SyncEvent|Text|TextMetrics|TimeEvent|TimeRanges|Touch|TouchEvent|TouchList|Transferable\n |TreeWalker|UIEvent|USVString|VRDisplayCapabilities|ValidityState|WaveShaperNode|WebGL|WebGLActiveInfo|WebGLBuffer\n |WebGLContextEvent|WebGLFramebuffer|WebGLProgram|WebGLRenderbuffer|WebGLRenderingContext|WebGLShader|WebGLShaderPrecisionFormat\n |WebGLTexture|WebGLTimerQueryEXT|WebGLTransformFeedback|WebGLUniformLocation|WebGLVertexArrayObject|WebGLVertexArrayObjectOES\n |WebSocket|WebSockets|WebVTT|WheelEvent|Window|WindowBase64|WindowEventHandlers|WindowTimers|Worker|WorkerGlobalScope\n |WorkerLocation|WorkerNavigator|XMLHttpRequest|XMLHttpRequestEventTarget|XMLSerializer|XPathExpression|XPathResult\n |XSLTProcessor))\\b(?!\\$)",
2147 "captures": {
2148 "1": {
2149 "name": "support.variable.dom.js"
2150 },
2151 "2": {
2152 "name": "support.class.dom.js"
2153 }
2154 }
2155 },
2156 {
2157 "match": "(?x) (\\.) \\s* (?:\n (ATTRIBUTE_NODE|CDATA_SECTION_NODE|COMMENT_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE\n |DOMSTRING_SIZE_ERR|ELEMENT_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|HIERARCHY_REQUEST_ERR|INDEX_SIZE_ERR\n |INUSE_ATTRIBUTE_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR\n |NOT_SUPPORTED_ERR|NOTATION_NODE|PROCESSING_INSTRUCTION_NODE|TEXT_NODE|WRONG_DOCUMENT_ERR)\n |\n (_content|[xyz]|abbr|above|accept|acceptCharset|accessKey|action|align|[av]Link(?:color)?|all|alt|anchors|appCodeName\n |appCore|applets|appMinorVersion|appName|appVersion|archive|areas|arguments|attributes|availHeight|availLeft|availTop\n |availWidth|axis|background|backgroundColor|backgroundImage|below|bgColor|body|border|borderBottomWidth|borderColor\n |borderLeftWidth|borderRightWidth|borderStyle|borderTopWidth|borderWidth|bottom|bufferDepth|callee|caller|caption\n |cellPadding|cells|cellSpacing|ch|characterSet|charset|checked|childNodes|chOff|cite|classes|className|clear\n |clientInformation|clip|clipBoardData|closed|code|codeBase|codeType|color|colorDepth|cols|colSpan|compact|complete\n |components|content|controllers|cookie|cookieEnabled|cords|cpuClass|crypto|current|data|dateTime|declare|defaultCharset\n |defaultChecked|defaultSelected|defaultStatus|defaultValue|defaultView|defer|description|dialogArguments|dialogHeight\n |dialogLeft|dialogTop|dialogWidth|dir|directories|disabled|display|docmain|doctype|documentElement|elements|embeds\n |enabledPlugin|encoding|enctype|entities|event|expando|external|face|fgColor|filename|firstChild|fontFamily|fontSize\n |fontWeight|form|formName|forms|frame|frameBorder|frameElement|frames|hasFocus|hash|headers|height|history|host\n |hostname|href|hreflang|hspace|htmlFor|httpEquiv|id|ids|ignoreCase|images|implementation|index|innerHeight|innerWidth\n |input|isMap|label|lang|language|lastChild|lastIndex|lastMatch|lastModified|lastParen|layer[sXY]|left|leftContext\n |lineHeight|link|linkColor|links|listStyleType|localName|location|locationbar|longDesc|lowsrc|lowSrc|marginBottom\n |marginHeight|marginLeft|marginRight|marginTop|marginWidth|maxLength|media|menubar|method|mimeTypes|multiline|multiple\n |name|nameProp|namespaces|namespaceURI|next|nextSibling|nodeName|nodeType|nodeValue|noHref|noResize|noShade|notationName\n |notations|noWrap|object|offscreenBuffering|onLine|onreadystatechange|opener|opsProfile|options|oscpu|outerHeight\n |outerWidth|ownerDocument|paddingBottom|paddingLeft|paddingRight|paddingTop|page[XY]|page[XY]Offset|parent|parentLayer\n |parentNode|parentWindow|pathname|personalbar|pixelDepth|pkcs11|platform|plugins|port|prefix|previous|previousDibling\n |product|productSub|profile|profileend|prompt|prompter|protocol|publicId|readOnly|readyState|referrer|rel|responseText\n |responseXML|rev|right|rightContext|rowIndex|rows|rowSpan|rules|scheme|scope|screen[XY]|screenLeft|screenTop|scripts\n |scrollbars|scrolling|sectionRowIndex|security|securityPolicy|selected|selectedIndex|selection|self|shape|siblingAbove\n |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary\n |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead\n |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile\n |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\\b(?!\\$|\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
2158 "captures": {
2159 "1": {
2160 "name": "punctuation.accessor.js"
2161 },
2162 "2": {
2163 "name": "support.constant.dom.js"
2164 },
2165 "3": {
2166 "name": "support.variable.property.dom.js"
2167 }
2168 }
2169 },
2170 {
2171 "name": "support.class.node.js",
2172 "match": "(?x)(?<!\\.|\\$)\\b(Buffer|EventEmitter|Server|Pipe|Socket|REPLServer|ReadStream|WriteStream|Stream\n |Inflate|Deflate|InflateRaw|DeflateRaw|GZip|GUnzip|Unzip|Zip)\\b(?!\\$)"
2173 },
2174 {
2175 "name": "support.module.node.js",
2176 "match": "(?x)(?<!\\.|\\$)\\b(assert|buffer|child_process|cluster|constants|crypto|dgram|dns|domain|events|fs|http|https|net\n |os|path|punycode|querystring|readline|repl|stream|string_decoder|timers|tls|tty|url|util|vm|zlib)\\b(?!\\$)"
2177 },
2178 {
2179 "match": "(?x)(?<!\\.|\\$)\\b(process)(?:(\\.)(?:\n (arch|argv|config|connected|env|execArgv|execPath|exitCode|mainModule|pid|platform|release|stderr|stdin|stdout|title|version|versions)\n |\n (abort|chdir|cwd|disconnect|exit|[sg]ete?[gu]id|send|[sg]etgroups|initgroups|kill|memoryUsage|nextTick|umask|uptime|hrtime)\n))?\\b(?!\\$)",
2180 "captures": {
2181 "1": {
2182 "name": "support.variable.object.process.js"
2183 },
2184 "2": {
2185 "name": "punctuation.accessor.js"
2186 },
2187 "3": {
2188 "name": "support.variable.property.process.js"
2189 },
2190 "4": {
2191 "name": "support.function.process.js"
2192 }
2193 }
2194 },
2195 {
2196 "match": "(?<!\\.|\\$)\\b(?:(exports)|(module)(?:(\\.)(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)",
2197 "captures": {
2198 "1": {
2199 "name": "support.type.object.module.js"
2200 },
2201 "2": {
2202 "name": "support.type.object.module.js"
2203 },
2204 "3": {
2205 "name": "punctuation.accessor.js"
2206 },
2207 "4": {
2208 "name": "support.type.object.module.js"
2209 }
2210 }
2211 },
2212 {
2213 "name": "support.variable.object.node.js",
2214 "match": "(?<!\\.|\\$)\\b(global|GLOBAL|root|__dirname|__filename)\\b(?!\\$)"
2215 },
2216 {
2217 "match": "(?x) (\\.) \\s* \n(?:\n (on(?:Rowsinserted|Rowsdelete|Rowenter|Rowexit|Resize|Resizestart|Resizeend|Reset|\n Readystatechange|Mouseout|Mouseover|Mousedown|Mouseup|Mousemove|\n Before(?:cut|deactivate|unload|update|paste|print|editfocus|activate)|\n Blur|Scrolltop|Submit|Select|Selectstart|Selectionchange|Hover|Help|\n Change|Contextmenu|Controlselect|Cut|Cellchange|Clock|Close|Deactivate|\n Datasetchanged|Datasetcomplete|Dataavailable|Drop|Drag|Dragstart|Dragover|\n Dragdrop|Dragenter|Dragend|Dragleave|Dblclick|Unload|Paste|Propertychange|Error|\n Errorupdate|Keydown|Keyup|Keypress|Focus|Load|Activate|Afterupdate|Afterprint|Abort)\n ) |\n (shift|showModelessDialog|showModalDialog|showHelp|scroll|scrollX|scrollByPages|\n scrollByLines|scrollY|scrollTo|stop|strike|sizeToContent|sidebar|signText|sort|\n sup|sub|substr|substring|splice|split|send|set(?:Milliseconds|Seconds|Minutes|Hours|\n Month|Year|FullYear|Date|UTC(?:Milliseconds|Seconds|Minutes|Hours|Month|FullYear|Date)|\n Time|Hotkeys|Cursor|ZOptions|Active|Resizable|RequestHeader)|search|slice|\n savePreferences|small|home|handleEvent|navigate|char|charCodeAt|charAt|concat|\n contextual|confirm|compile|clear|captureEvents|call|createStyleSheet|createPopup|\n createEventObject|to(?:GMTString|UTCString|String|Source|UpperCase|LowerCase|LocaleString)|\n test|taint|taintEnabled|indexOf|italics|disableExternalCapture|dump|detachEvent|unshift|\n untaint|unwatch|updateCommands|join|javaEnabled|pop|push|plugins.refresh|paddings|parse|\n print|prompt|preference|enableExternalCapture|exec|execScript|valueOf|UTC|find|file|\n fileModifiedDate|fileSize|fileCreatedDate|fileUpdatedDate|fixed|fontsize|fontcolor|\n forward|fromCharCode|watch|link|load|lastIndexOf|anchor|attachEvent|atob|apply|alert|\n abort|routeEvents|resize|resizeBy|resizeTo|recalc|returnValue|replace|reverse|reload|\n releaseCapture|releaseEvents|go|get(?:Milliseconds|Seconds|Minutes|Hours|Month|Day|Year|FullYear|\n Time|Date|TimezoneOffset|UTC(?:Milliseconds|Seconds|Minutes|Hours|Day|Month|FullYear|Date)|\n Attention|Selection|ResponseHeader|AllResponseHeaders)|moveBy|moveBelow|moveTo|\n moveToAbsolute|moveAbove|mergeAttributes|match|margins|btoa|big|bold|borderWidths|blink|back\n ) |\n (acceptNode|add|addEventListener|addTextTrack|adoptNode|after|animate|append|\n appendChild|appendData|before|blur|canPlayType|captureStream|\n caretPositionFromPoint|caretRangeFromPoint|checkValidity|clear|click|\n cloneContents|cloneNode|cloneRange|close|closest|collapse|\n compareBoundaryPoints|compareDocumentPosition|comparePoint|contains|\n convertPointFromNode|convertQuadFromNode|convertRectFromNode|createAttribute|\n createAttributeNS|createCaption|createCDATASection|createComment|\n createContextualFragment|createDocument|createDocumentFragment|\n createDocumentType|createElement|createElementNS|createEntityReference|\n createEvent|createExpression|createHTMLDocument|createNodeIterator|\n createNSResolver|createProcessingInstruction|createRange|createShadowRoot|\n createTBody|createTextNode|createTFoot|createTHead|createTreeWalker|delete|\n deleteCaption|deleteCell|deleteContents|deleteData|deleteRow|deleteTFoot|\n deleteTHead|detach|disconnect|dispatchEvent|elementFromPoint|elementsFromPoint|\n enableStyleSheetsForSet|entries|evaluate|execCommand|exitFullscreen|\n exitPointerLock|expand|extractContents|fastSeek|firstChild|focus|forEach|get|\n getAll|getAnimations|getAttribute|getAttributeNames|getAttributeNode|\n getAttributeNodeNS|getAttributeNS|getBoundingClientRect|getBoxQuads|\n getClientRects|getContext|getDestinationInsertionPoints|getElementById|\n getElementsByClassName|getElementsByName|getElementsByTagName|\n getElementsByTagNameNS|getItem|getNamedItem|getSelection|getStartDate|\n getVideoPlaybackQuality|has|hasAttribute|hasAttributeNS|hasAttributes|\n hasChildNodes|hasFeature|hasFocus|importNode|initEvent|insertAdjacentElement|\n insertAdjacentHTML|insertAdjacentText|insertBefore|insertCell|insertData|\n insertNode|insertRow|intersectsNode|isDefaultNamespace|isEqualNode|\n isPointInRange|isSameNode|item|key|keys|lastChild|load|lookupNamespaceURI|\n lookupPrefix|matches|move|moveAttribute|moveAttributeNode|moveChild|\n moveNamedItem|namedItem|nextNode|nextSibling|normalize|observe|open|\n parentNode|pause|play|postMessage|prepend|preventDefault|previousNode|\n previousSibling|probablySupportsContext|queryCommandEnabled|\n queryCommandIndeterm|queryCommandState|queryCommandSupported|queryCommandValue|\n querySelector|querySelectorAll|registerContentHandler|registerElement|\n registerProtocolHandler|releaseCapture|releaseEvents|remove|removeAttribute|\n removeAttributeNode|removeAttributeNS|removeChild|removeEventListener|\n removeItem|replace|replaceChild|replaceData|replaceWith|reportValidity|\n requestFullscreen|requestPointerLock|reset|scroll|scrollBy|scrollIntoView|\n scrollTo|seekToNextFrame|select|selectNode|selectNodeContents|set|setAttribute|\n setAttributeNode|setAttributeNodeNS|setAttributeNS|setCapture|\n setCustomValidity|setEnd|setEndAfter|setEndBefore|setItem|setNamedItem|\n setRangeText|setSelectionRange|setSinkId|setStart|setStartAfter|setStartBefore|\n slice|splitText|stepDown|stepUp|stopImmediatePropagation|stopPropagation|\n submit|substringData|supports|surroundContents|takeRecords|terminate|toBlob|\n toDataURL|toggle|toString|values|write|writeln\n )\n)(?=\\s*\\()",
2218 "captures": {
2219 "1": {
2220 "name": "punctuation.accessor.js"
2221 },
2222 "2": {
2223 "name": "support.function.event-handler.js"
2224 },
2225 "3": {
2226 "name": "support.function.js"
2227 },
2228 "4": {
2229 "name": "support.function.dom.js"
2230 }
2231 }
2232 }
2233 ]
2234 },
2235 "function-call": {
2236 "begin": "(?=(\\.\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
2237 "end": "(?<=\\))(?!(\\.\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
2238 "patterns": [
2239 {
2240 "include": "#support-objects"
2241 },
2242 {
2243 "name": "punctuation.accessor.js",
2244 "match": "\\."
2245 },
2246 {
2247 "name": "entity.name.function.js",
2248 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
2249 },
2250 {
2251 "include": "#comment"
2252 },
2253 {
2254 "name": "meta.type.parameters.js",
2255 "begin": "\\<",
2256 "beginCaptures": {
2257 "0": {
2258 "name": "punctuation.definition.typeparameters.begin.js"
2259 }
2260 },
2261 "end": "\\>",
2262 "endCaptures": {
2263 "0": {
2264 "name": "punctuation.definition.typeparameters.end.js"
2265 }
2266 },
2267 "patterns": [
2268 {
2269 "include": "#type"
2270 },
2271 {
2272 "include": "#punctuation-comma"
2273 }
2274 ]
2275 },
2276 {
2277 "include": "#paren-expression"
2278 }
2279 ]
2280 },
2281 "identifiers": {
2282 "patterns": [
2283 {
2284 "name": "support.class.js",
2285 "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\.\\s*prototype\\b(?!\\$))"
2286 },
2287 {
2288 "match": "(?x)(\\.)\\s*(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
2289 "captures": {
2290 "1": {
2291 "name": "punctuation.accessor.js"
2292 },
2293 "2": {
2294 "name": "constant.other.object.property.js"
2295 },
2296 "3": {
2297 "name": "variable.other.object.property.js"
2298 }
2299 }
2300 },
2301 {
2302 "match": "(?x)(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*( (async\\s+)|(function\\s*[(<])|(function\\s+)| ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)| ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)))",
2303 "captures": {
2304 "1": {
2305 "name": "punctuation.accessor.js"
2306 },
2307 "2": {
2308 "name": "entity.name.function.js"
2309 }
2310 }
2311 },
2312 {
2313 "match": "(\\.)\\s*([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])",
2314 "captures": {
2315 "1": {
2316 "name": "punctuation.accessor.js"
2317 },
2318 "2": {
2319 "name": "constant.other.property.js"
2320 }
2321 }
2322 },
2323 {
2324 "match": "(\\.)\\s*([_$[:alpha:]][_$[:alnum:]]*)",
2325 "captures": {
2326 "1": {
2327 "name": "punctuation.accessor.js"
2328 },
2329 "2": {
2330 "name": "variable.other.property.js"
2331 }
2332 }
2333 },
2334 {
2335 "match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
2336 "captures": {
2337 "1": {
2338 "name": "constant.other.object.js"
2339 },
2340 "2": {
2341 "name": "variable.other.object.js"
2342 }
2343 }
2344 },
2345 {
2346 "name": "constant.other.js",
2347 "match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
2348 },
2349 {
2350 "name": "variable.other.readwrite.js",
2351 "match": "[_$[:alpha:]][_$[:alnum:]]*"
2352 }
2353 ]
2354 },
2355 "cast": {
2356 "patterns": [
2357 {
2358 "include": "#jsx"
2359 }
2360 ]
2361 },
2362 "new-expr": {
2363 "name": "new.expr.js",
2364 "begin": "(?<!\\.|\\$)\\b(new)\\b(?!\\$)",
2365 "beginCaptures": {
2366 "1": {
2367 "name": "keyword.operator.new.js"
2368 }
2369 },
2370 "end": "(?<=\\))|(?=[;),]|$|((?<!\\.|\\$)\\bnew\\b(?!\\$)))",
2371 "patterns": [
2372 {
2373 "include": "#paren-expression"
2374 },
2375 {
2376 "include": "#class-or-interface-declaration"
2377 },
2378 {
2379 "include": "#type"
2380 }
2381 ]
2382 },
2383 "object-member": {
2384 "patterns": [
2385 {
2386 "include": "#comment"
2387 },
2388 {
2389 "include": "#method-declaration"
2390 },
2391 {
2392 "name": "meta.object.member.js",
2393 "begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*:)",
2394 "end": "(?=,|\\})",
2395 "patterns": [
2396 {
2397 "name": "meta.object-literal.key.js",
2398 "begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*:)",
2399 "end": ":",
2400 "endCaptures": {
2401 "0": {
2402 "name": "punctuation.separator.key-value.js"
2403 }
2404 },
2405 "patterns": [
2406 {
2407 "include": "#string"
2408 },
2409 {
2410 "include": "#array-literal"
2411 }
2412 ]
2413 },
2414 {
2415 "include": "#expression"
2416 }
2417 ]
2418 },
2419 {
2420 "name": "meta.object.member.js",
2421 "begin": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)(?=\\s*( (async\\s+)|(function\\s*[(<])|(function\\s+)| ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)| ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>))))",
2422 "beginCaptures": {
2423 "0": {
2424 "name": "meta.object-literal.key.js"
2425 },
2426 "1": {
2427 "name": "entity.name.function.js"
2428 },
2429 "2": {
2430 "name": "punctuation.separator.key-value.js"
2431 }
2432 },
2433 "end": "(?=,|\\})",
2434 "patterns": [
2435 {
2436 "include": "#expression"
2437 }
2438 ]
2439 },
2440 {
2441 "name": "meta.object.member.js",
2442 "begin": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(:)",
2443 "beginCaptures": {
2444 "0": {
2445 "name": "meta.object-literal.key.js"
2446 },
2447 "1": {
2448 "name": "punctuation.separator.key-value.js"
2449 }
2450 },
2451 "end": "(?=,|\\})",
2452 "patterns": [
2453 {
2454 "include": "#expression"
2455 }
2456 ]
2457 },
2458 {
2459 "name": "meta.object.member.js",
2460 "begin": "\\.\\.\\.",
2461 "beginCaptures": {
2462 "0": {
2463 "name": "keyword.operator.spread.js"
2464 }
2465 },
2466 "end": "(?=,|\\})",
2467 "patterns": [
2468 {
2469 "include": "#expression"
2470 }
2471 ]
2472 },
2473 {
2474 "name": "meta.object.member.js",
2475 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=,|\\}|$)",
2476 "captures": {
2477 "1": {
2478 "name": "variable.other.readwrite.js"
2479 }
2480 }
2481 },
2482 {
2483 "include": "#punctuation-comma"
2484 }
2485 ]
2486 },
2487 "expression-operators": {
2488 "patterns": [
2489 {
2490 "name": "keyword.control.flow.js",
2491 "match": "(?<!\\.|\\$)\\b(await)\\b(?!\\$)"
2492 },
2493 {
2494 "name": "keyword.operator.expression.delete.js",
2495 "match": "(?<!\\.|\\$)\\bdelete\\b(?!\\$)"
2496 },
2497 {
2498 "name": "keyword.operator.expression.in.js",
2499 "match": "(?<!\\.|\\$)\\bin\\b(?!\\$)"
2500 },
2501 {
2502 "name": "keyword.operator.expression.of.js",
2503 "match": "(?<!\\.|\\$)\\bof\\b(?!\\$)"
2504 },
2505 {
2506 "name": "keyword.operator.expression.instanceof.js",
2507 "match": "(?<!\\.|\\$)\\binstanceof\\b(?!\\$)"
2508 },
2509 {
2510 "name": "keyword.operator.new.js",
2511 "match": "(?<!\\.|\\$)\\bnew\\b(?!\\$)"
2512 },
2513 {
2514 "include": "#typeof-operator"
2515 },
2516 {
2517 "name": "keyword.operator.expression.void.js",
2518 "match": "(?<!\\.|\\$)\\bvoid\\b(?!\\$)"
2519 },
2520 {
2521 "begin": "(?<!\\.|\\$)\\bas\\b(?!\\$)",
2522 "beginCaptures": {
2523 "0": {
2524 "name": "keyword.control.as.js"
2525 }
2526 },
2527 "end": "(?=$|[;,:})\\]])",
2528 "patterns": [
2529 {
2530 "include": "#type"
2531 }
2532 ]
2533 },
2534 {
2535 "name": "keyword.operator.spread.js",
2536 "match": "\\.\\.\\."
2537 },
2538 {
2539 "name": "keyword.operator.assignment.compound.js",
2540 "match": "\\*=|(?<!\\()/=|%=|\\+=|\\-="
2541 },
2542 {
2543 "name": "keyword.operator.assignment.compound.bitwise.js",
2544 "match": "\\&=|\\^=|<<=|>>=|>>>=|\\|="
2545 },
2546 {
2547 "name": "keyword.operator.bitwise.shift.js",
2548 "match": "<<|>>>|>>"
2549 },
2550 {
2551 "name": "keyword.operator.comparison.js",
2552 "match": "===|!==|==|!="
2553 },
2554 {
2555 "name": "keyword.operator.relational.js",
2556 "match": "<=|>=|<>|<|>"
2557 },
2558 {
2559 "name": "keyword.operator.logical.js",
2560 "match": "\\!|&&|\\|\\|"
2561 },
2562 {
2563 "name": "keyword.operator.bitwise.js",
2564 "match": "\\&|~|\\^|\\|"
2565 },
2566 {
2567 "name": "keyword.operator.assignment.js",
2568 "match": "\\="
2569 },
2570 {
2571 "name": "keyword.operator.decrement.js",
2572 "match": "--"
2573 },
2574 {
2575 "name": "keyword.operator.increment.js",
2576 "match": "\\+\\+"
2577 },
2578 {
2579 "name": "keyword.operator.arithmetic.js",
2580 "match": "%|\\*|/|-|\\+"
2581 },
2582 {
2583 "match": "(?<=[_$[:alnum:]])\\s*(/)(?![/*])",
2584 "captures": {
2585 "1": {
2586 "name": "keyword.operator.arithmetic.js"
2587 }
2588 }
2589 }
2590 ]
2591 },
2592 "typeof-operator": {
2593 "name": "keyword.operator.expression.typeof.js",
2594 "match": "(?<!\\.|\\$)\\btypeof\\b(?!\\$)"
2595 },
2596 "arrow-function": {
2597 "patterns": [
2598 {
2599 "name": "meta.arrow.js",
2600 "match": "(?<!\\.|\\$)(\\basync)(?=\\s*[<(])",
2601 "captures": {
2602 "1": {
2603 "name": "storage.modifier.async.js"
2604 }
2605 }
2606 },
2607 {
2608 "name": "meta.arrow.js",
2609 "match": "(?:(?<!\\.|\\$)(\\basync)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?==>)",
2610 "captures": {
2611 "1": {
2612 "name": "storage.modifier.async.js"
2613 },
2614 "2": {
2615 "name": "variable.parameter.js"
2616 }
2617 }
2618 },
2619 {
2620 "name": "meta.arrow.js",
2621 "begin": "(?x)\\s*(?=(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)",
2622 "end": "(?==>)",
2623 "patterns": [
2624 {
2625 "include": "#comment"
2626 },
2627 {
2628 "include": "#type-parameters"
2629 },
2630 {
2631 "include": "#function-parameters"
2632 },
2633 {
2634 "include": "#arrow-return-type"
2635 }
2636 ]
2637 },
2638 {
2639 "name": "meta.arrow.js",
2640 "begin": "=>",
2641 "beginCaptures": {
2642 "0": {
2643 "name": "storage.type.function.arrow.js"
2644 }
2645 },
2646 "end": "(?<=\\})|((?!\\{)(?=\\S))",
2647 "patterns": [
2648 {
2649 "include": "#decl-block"
2650 },
2651 {
2652 "include": "#expression"
2653 }
2654 ]
2655 }
2656 ]
2657 },
2658 "arrow-return-type": {
2659 "name": "meta.return.type.arrow.js",
2660 "begin": "(?<=\\))\\s*(:)",
2661 "beginCaptures": {
2662 "1": {
2663 "name": "keyword.operator.type.annotation.js"
2664 }
2665 },
2666 "end": "(?<!:)((?=$)|(?==>|;|//))",
2667 "patterns": [
2668 {
2669 "include": "#type-predicate-operator"
2670 },
2671 {
2672 "include": "#type"
2673 }
2674 ]
2675 },
2676 "punctuation-comma": {
2677 "name": "punctuation.separator.comma.js",
2678 "match": ","
2679 },
2680 "punctuation-semicolon": {
2681 "name": "punctuation.terminator.statement.js",
2682 "match": ";"
2683 },
2684 "punctuation-accessor": {
2685 "name": "punctuation.accessor.js",
2686 "match": "\\."
2687 },
2688 "paren-expression": {
2689 "begin": "\\(",
2690 "beginCaptures": {
2691 "0": {
2692 "name": "meta.brace.round.js"
2693 }
2694 },
2695 "end": "\\)",
2696 "endCaptures": {
2697 "0": {
2698 "name": "meta.brace.round.js"
2699 }
2700 },
2701 "patterns": [
2702 {
2703 "include": "#expression"
2704 },
2705 {
2706 "include": "#punctuation-comma"
2707 }
2708 ]
2709 },
2710 "qstring-double": {
2711 "name": "string.quoted.double.js",
2712 "begin": "\"",
2713 "beginCaptures": {
2714 "0": {
2715 "name": "punctuation.definition.string.begin.js"
2716 }
2717 },
2718 "end": "(\")|((?:[^\\\\\\n])$)",
2719 "endCaptures": {
2720 "1": {
2721 "name": "punctuation.definition.string.end.js"
2722 },
2723 "2": {
2724 "name": "invalid.illegal.newline.js"
2725 }
2726 },
2727 "patterns": [
2728 {
2729 "include": "#string-character-escape"
2730 }
2731 ]
2732 },
2733 "qstring-single": {
2734 "name": "string.quoted.single.js",
2735 "begin": "'",
2736 "beginCaptures": {
2737 "0": {
2738 "name": "punctuation.definition.string.begin.js"
2739 }
2740 },
2741 "end": "(\\')|((?:[^\\\\\\n])$)",
2742 "endCaptures": {
2743 "1": {
2744 "name": "punctuation.definition.string.end.js"
2745 },
2746 "2": {
2747 "name": "invalid.illegal.newline.js"
2748 }
2749 },
2750 "patterns": [
2751 {
2752 "include": "#string-character-escape"
2753 }
2754 ]
2755 },
2756 "regex": {
2757 "patterns": [
2758 {
2759 "name": "string.regex.js",
2760 "begin": "(?<=[=(:,\\[?+!]|return|case|=>|&&|\\|\\||\\*\\/)\\s*(/)(?![/*])(?=(?:[^/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+/(?![/*])[gimy]*(?!\\s*[a-zA-Z0-9_$]))",
2761 "beginCaptures": {
2762 "1": {
2763 "name": "punctuation.definition.string.begin.js"
2764 }
2765 },
2766 "end": "(/)([gimuy]*)",
2767 "endCaptures": {
2768 "1": {
2769 "name": "punctuation.definition.string.end.js"
2770 },
2771 "2": {
2772 "name": "keyword.other.js"
2773 }
2774 },
2775 "patterns": [
2776 {
2777 "include": "#regexp"
2778 }
2779 ]
2780 },
2781 {
2782 "name": "string.regex.js",
2783 "begin": "/(?![/*])(?=(?:[^/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+/(?![/*])[gimy]*(?!\\s*[a-zA-Z0-9_$]))",
2784 "beginCaptures": {
2785 "0": {
2786 "name": "punctuation.definition.string.begin.js"
2787 }
2788 },
2789 "end": "(/)([gimuy]*)",
2790 "endCaptures": {
2791 "1": {
2792 "name": "punctuation.definition.string.end.js"
2793 },
2794 "2": {
2795 "name": "keyword.other.js"
2796 }
2797 },
2798 "patterns": [
2799 {
2800 "include": "#regexp"
2801 }
2802 ]
2803 }
2804 ]
2805 },
2806 "regexp": {
2807 "patterns": [
2808 {
2809 "name": "keyword.control.anchor.regexp",
2810 "match": "\\\\[bB]|\\^|\\$"
2811 },
2812 {
2813 "name": "keyword.other.back-reference.regexp",
2814 "match": "\\\\[1-9]\\d*"
2815 },
2816 {
2817 "name": "keyword.operator.quantifier.regexp",
2818 "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??"
2819 },
2820 {
2821 "name": "keyword.operator.or.regexp",
2822 "match": "\\|"
2823 },
2824 {
2825 "name": "meta.group.assertion.regexp",
2826 "begin": "(\\()((\\?=)|(\\?!))",
2827 "beginCaptures": {
2828 "1": {
2829 "name": "punctuation.definition.group.regexp"
2830 },
2831 "2": {
2832 "name": "punctuation.definition.group.assertion.regexp"
2833 },
2834 "3": {
2835 "name": "meta.assertion.look-ahead.regexp"
2836 },
2837 "4": {
2838 "name": "meta.assertion.negative-look-ahead.regexp"
2839 }
2840 },
2841 "end": "(\\))",
2842 "endCaptures": {
2843 "1": {
2844 "name": "punctuation.definition.group.regexp"
2845 }
2846 },
2847 "patterns": [
2848 {
2849 "include": "#regexp"
2850 }
2851 ]
2852 },
2853 {
2854 "name": "meta.group.regexp",
2855 "begin": "\\((\\?:)?",
2856 "beginCaptures": {
2857 "0": {
2858 "name": "punctuation.definition.group.regexp"
2859 },
2860 "1": {
2861 "name": "punctuation.definition.group.capture.regexp"
2862 }
2863 },
2864 "end": "\\)",
2865 "endCaptures": {
2866 "0": {
2867 "name": "punctuation.definition.group.regexp"
2868 }
2869 },
2870 "patterns": [
2871 {
2872 "include": "#regexp"
2873 }
2874 ]
2875 },
2876 {
2877 "name": "constant.other.character-class.set.regexp",
2878 "begin": "(\\[)(\\^)?",
2879 "beginCaptures": {
2880 "1": {
2881 "name": "punctuation.definition.character-class.regexp"
2882 },
2883 "2": {
2884 "name": "keyword.operator.negation.regexp"
2885 }
2886 },
2887 "end": "(\\])",
2888 "endCaptures": {
2889 "1": {
2890 "name": "punctuation.definition.character-class.regexp"
2891 }
2892 },
2893 "patterns": [
2894 {
2895 "name": "constant.other.character-class.range.regexp",
2896 "match": "(?:.|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))",
2897 "captures": {
2898 "1": {
2899 "name": "constant.character.numeric.regexp"
2900 },
2901 "2": {
2902 "name": "constant.character.control.regexp"
2903 },
2904 "3": {
2905 "name": "constant.character.escape.backslash.regexp"
2906 },
2907 "4": {
2908 "name": "constant.character.numeric.regexp"
2909 },
2910 "5": {
2911 "name": "constant.character.control.regexp"
2912 },
2913 "6": {
2914 "name": "constant.character.escape.backslash.regexp"
2915 }
2916 }
2917 },
2918 {
2919 "include": "#regex-character-class"
2920 }
2921 ]
2922 },
2923 {
2924 "include": "#regex-character-class"
2925 }
2926 ]
2927 },
2928 "regex-character-class": {
2929 "patterns": [
2930 {
2931 "name": "constant.other.character-class.regexp",
2932 "match": "\\\\[wWsSdDtrnvf]|\\."
2933 },
2934 {
2935 "name": "constant.character.numeric.regexp",
2936 "match": "\\\\([0-7]{3}|x\\h\\h|u\\h\\h\\h\\h)"
2937 },
2938 {
2939 "name": "constant.character.control.regexp",
2940 "match": "\\\\c[A-Z]"
2941 },
2942 {
2943 "name": "constant.character.escape.backslash.regexp",
2944 "match": "\\\\."
2945 }
2946 ]
2947 },
2948 "string": {
2949 "patterns": [
2950 {
2951 "include": "#qstring-single"
2952 },
2953 {
2954 "include": "#qstring-double"
2955 }
2956 ]
2957 },
2958 "template": {
2959 "name": "string.template.js",
2960 "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)",
2961 "beginCaptures": {
2962 "1": {
2963 "name": "entity.name.function.tagged-template.js"
2964 },
2965 "2": {
2966 "name": "punctuation.definition.string.template.begin.js"
2967 }
2968 },
2969 "end": "`",
2970 "endCaptures": {
2971 "0": {
2972 "name": "punctuation.definition.string.template.end.js"
2973 }
2974 },
2975 "patterns": [
2976 {
2977 "include": "#template-substitution-element"
2978 },
2979 {
2980 "include": "#string-character-escape"
2981 }
2982 ]
2983 },
2984 "string-character-escape": {
2985 "name": "constant.character.escape.js",
2986 "match": "\\\\(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)"
2987 },
2988 "template-substitution-element": {
2989 "name": "meta.template.expression.js",
2990 "begin": "\\$\\{",
2991 "beginCaptures": {
2992 "0": {
2993 "name": "punctuation.definition.template-expression.begin.js"
2994 }
2995 },
2996 "end": "\\}",
2997 "endCaptures": {
2998 "0": {
2999 "name": "punctuation.definition.template-expression.end.js"
3000 }
3001 },
3002 "patterns": [
3003 {
3004 "include": "#expression"
3005 }
3006 ]
3007 },
3008 "literal": {
3009 "name": "literal.js",
3010 "patterns": [
3011 {
3012 "include": "#numeric-literal"
3013 },
3014 {
3015 "include": "#boolean-literal"
3016 },
3017 {
3018 "include": "#null-literal"
3019 },
3020 {
3021 "include": "#undefined-literal"
3022 },
3023 {
3024 "include": "#numericConstant-literal"
3025 },
3026 {
3027 "include": "#array-literal"
3028 },
3029 {
3030 "include": "#this-literal"
3031 },
3032 {
3033 "include": "#super-literal"
3034 }
3035 ]
3036 },
3037 "array-literal": {
3038 "name": "meta.array.literal.js",
3039 "begin": "\\[",
3040 "beginCaptures": {
3041 "0": {
3042 "name": "meta.brace.square.js"
3043 }
3044 },
3045 "end": "\\]",
3046 "endCaptures": {
3047 "0": {
3048 "name": "meta.brace.square.js"
3049 }
3050 },
3051 "patterns": [
3052 {
3053 "include": "#expression"
3054 },
3055 {
3056 "include": "#punctuation-comma"
3057 }
3058 ]
3059 },
3060 "numeric-literal": {
3061 "patterns": [
3062 {
3063 "name": "constant.numeric.hex.js",
3064 "match": "\\b(?<!\\$)0(x|X)[0-9a-fA-F]+\\b(?!\\$)"
3065 },
3066 {
3067 "name": "constant.numeric.binary.js",
3068 "match": "\\b(?<!\\$)0(b|B)[01]+\\b(?!\\$)"
3069 },
3070 {
3071 "name": "constant.numeric.octal.js",
3072 "match": "\\b(?<!\\$)0(o|O)?[0-7]+\\b(?!\\$)"
3073 },
3074 {
3075 "match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9]+(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # 1.1E+3\n (?:\\b[0-9]+(\\.)[eE][+-]?[0-9]+\\b)| # 1.E+3\n (?:\\B(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # .1E+3\n (?:\\b[0-9]+[eE][+-]?[0-9]+\\b)| # 1E+3\n (?:\\b[0-9]+(\\.)[0-9]+\\b)| # 1.1\n (?:\\b[0-9]+(\\.)\\B)| # 1.\n (?:\\B(\\.)[0-9]+\\b)| # .1\n (?:\\b[0-9]+\\b(?!\\.)) # 1\n)(?!\\$)",
3076 "captures": {
3077 "0": {
3078 "name": "constant.numeric.decimal.js"
3079 },
3080 "1": {
3081 "name": "meta.delimiter.decimal.period.js"
3082 },
3083 "2": {
3084 "name": "meta.delimiter.decimal.period.js"
3085 },
3086 "3": {
3087 "name": "meta.delimiter.decimal.period.js"
3088 },
3089 "4": {
3090 "name": "meta.delimiter.decimal.period.js"
3091 },
3092 "5": {
3093 "name": "meta.delimiter.decimal.period.js"
3094 },
3095 "6": {
3096 "name": "meta.delimiter.decimal.period.js"
3097 }
3098 }
3099 }
3100 ]
3101 },
3102 "boolean-literal": {
3103 "patterns": [
3104 {
3105 "name": "constant.language.boolean.true.js",
3106 "match": "(?<!\\.|\\$)\\btrue\\b(?!\\$)"
3107 },
3108 {
3109 "name": "constant.language.boolean.false.js",
3110 "match": "(?<!\\.|\\$)\\bfalse\\b(?!\\$)"
3111 }
3112 ]
3113 },
3114 "null-literal": {
3115 "name": "constant.language.null.js",
3116 "match": "(?<!\\.|\\$)\\bnull\\b(?!\\$)"
3117 },
3118 "this-literal": {
3119 "name": "variable.language.this.js",
3120 "match": "(?<!\\.|\\$)\\bthis\\b(?!\\$)"
3121 },
3122 "super-literal": {
3123 "name": "variable.language.super.js",
3124 "match": "(?<!\\.|\\$)\\bsuper\\b(?!\\$)"
3125 },
3126 "undefined-literal": {
3127 "name": "constant.language.undefined.js",
3128 "match": "(?<!\\.|\\$)\\bundefined\\b(?!\\$)"
3129 },
3130 "numericConstant-literal": {
3131 "patterns": [
3132 {
3133 "name": "constant.language.nan.js",
3134 "match": "(?<!\\.|\\$)\\bNaN\\b(?!\\$)"
3135 },
3136 {
3137 "name": "constant.language.infinity.js",
3138 "match": "(?<!\\.|\\$)\\bInfinity\\b(?!\\$)"
3139 }
3140 ]
3141 },
3142 "access-modifier": {
3143 "name": "storage.modifier.js",
3144 "match": "(?<!\\.|\\$)\\b(abstract|public|protected|private|readonly|static)\\b(?!\\$)"
3145 },
3146 "property-accessor": {
3147 "name": "storage.type.property.js",
3148 "match": "(?<!\\.|\\$)\\b(get|set)\\b(?!\\$)"
3149 },
3150 "comment": {
3151 "patterns": [
3152 {
3153 "name": "comment.block.documentation.js",
3154 "begin": "/\\*\\*(?!/)",
3155 "beginCaptures": {
3156 "0": {
3157 "name": "punctuation.definition.comment.js"
3158 }
3159 },
3160 "end": "\\*/",
3161 "endCaptures": {
3162 "0": {
3163 "name": "punctuation.definition.comment.js"
3164 }
3165 },
3166 "patterns": [
3167 {
3168 "include": "#docblock"
3169 }
3170 ]
3171 },
3172 {
3173 "name": "comment.block.js",
3174 "begin": "/\\*",
3175 "beginCaptures": {
3176 "0": {
3177 "name": "punctuation.definition.comment.js"
3178 }
3179 },
3180 "end": "\\*/",
3181 "endCaptures": {
3182 "0": {
3183 "name": "punctuation.definition.comment.js"
3184 }
3185 }
3186 },
3187 {
3188 "begin": "(^[ \\t]+)?(?=//)",
3189 "beginCaptures": {
3190 "1": {
3191 "name": "punctuation.whitespace.comment.leading.js"
3192 }
3193 },
3194 "end": "(?=$)",
3195 "patterns": [
3196 {
3197 "name": "comment.line.double-slash.js",
3198 "begin": "//",
3199 "beginCaptures": {
3200 "0": {
3201 "name": "punctuation.definition.comment.js"
3202 }
3203 },
3204 "end": "(?=$)"
3205 }
3206 ]
3207 }
3208 ]
3209 },
3210 "directives": {
3211 "name": "comment.line.triple-slash.directive.js",
3212 "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|name)\\s*=\\s*((\\'[^']*\\')|(\\\"[^\"]*\\\")))+\\s*/>\\s*$)",
3213 "beginCaptures": {
3214 "1": {
3215 "name": "punctuation.definition.comment.js"
3216 }
3217 },
3218 "end": "(?=$)",
3219 "patterns": [
3220 {
3221 "name": "meta.tag.js",
3222 "begin": "(<)(reference|amd-dependency|amd-module)",
3223 "beginCaptures": {
3224 "1": {
3225 "name": "punctuation.definition.tag.directive.js"
3226 },
3227 "2": {
3228 "name": "entity.name.tag.directive.js"
3229 }
3230 },
3231 "end": "/>",
3232 "endCaptures": {
3233 "0": {
3234 "name": "punctuation.definition.tag.directive.js"
3235 }
3236 },
3237 "patterns": [
3238 {
3239 "name": "entity.other.attribute-name.directive.js",
3240 "match": "path|types|no-default-lib|name"
3241 },
3242 {
3243 "name": "keyword.operator.assignment.js",
3244 "match": "="
3245 },
3246 {
3247 "include": "#string"
3248 }
3249 ]
3250 }
3251 ]
3252 },
3253 "docblock": {
3254 "patterns": [
3255 {
3256 "name": "storage.type.class.jsdoc",
3257 "match": "(?<!\\w)@(abstract|access|alias|arg|argument|async|attribute|augments|author|beta|borrows|bubbes|callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright|default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exports?|extends|extension|extension_for|extensionfor|external|file|fileoverview|final|fires|for|function|global|host|ignore|implements|inherit[Dd]oc|inner|instance|interface|kind|lends|license|listens|main|member|memberof|method|mixex|mixins?|module|name|namespace|nocollapse|nosideeffects|override|overview|package|param|preserve|private|prop|property|protected|public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation|version|virtual|writeOnce)\\b"
3258 },
3259 {
3260 "match": "(?x)\n(?:(?<=@param)|(?<=@arg)|(?<=@argument)|(?<=@type))\n\\s+\n({(?:\n \\* | # {*} any type\n \\? | # {?} unknown type\n (?: # Check for a prefix\n \\? | # {?string} nullable type\n ! | # {!string} non-nullable type\n \\.{3} # {...string} variable number of parameters\n )?\n (?:\n \\( # Opening bracket of multiple types with parenthesis {(string|number)}\n [a-zA-Z_$]+\n (?:\n (?:\n [\\w$]*\n (?:\\[\\])? # {(string[]|number)} type application, an array of strings or a number\n ) |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n (?:\n [\\.|~] # {Foo.bar} namespaced, {string|number} multiple, {Foo~bar} class-specific callback\n [a-zA-Z_$]+\n (?:\n (?:\n [\\w$]*\n (?:\\[\\])? # {(string|number[])} type application, a string or an array of numbers\n ) |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n )*\n \\) |\n [a-zA-Z_$]+\n (?:\n (?:\n [\\w$]*\n (?:\\[\\])? # {string[]|number} type application, an array of strings or a number\n ) |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n (?:\n [\\.|~] # {Foo.bar} namespaced, {string|number} multiple, {Foo~bar} class-specific callback\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n )*\n )\n # Check for suffix\n (?:\\[\\])? # {string[]} type application, an array of strings\n =? # {string=} optional parameter\n)})\n\\s+\n(\n \\[ # [foo] optional parameter\n \\s*\n (?:\n [a-zA-Z_$][\\w$]*\n (?:\n (?:\\[\\])? # Foo[].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [a-zA-Z_$][\\w$]*\n )*\n (?:\n \\s*\n = # [foo=bar] Default parameter value\n \\s*\n [\\w$\\s]*\n )?\n )\n \\s*\n \\] |\n (?:\n [a-zA-Z_$][\\w$]*\n (?:\n (?:\\[\\])? # Foo[].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [a-zA-Z_$][\\w$]*\n )*\n )?\n)\n\\s+\n(?:-\\s+)? # optional hyphen before the description\n((?:(?!\\*\\/).)*) # The type description",
3261 "captures": {
3262 "0": {
3263 "name": "other.meta.jsdoc"
3264 },
3265 "1": {
3266 "name": "entity.name.type.instance.jsdoc"
3267 },
3268 "2": {
3269 "name": "variable.other.jsdoc"
3270 },
3271 "3": {
3272 "name": "other.description.jsdoc"
3273 }
3274 }
3275 },
3276 {
3277 "match": "(?x)\n({(?:\n \\* | # {*} any type\n \\? | # {?} unknown type\n\n (?: # Check for a prefix\n \\? | # {?string} nullable type\n ! | # {!string} non-nullable type\n \\.{3} # {...string} variable number of parameters\n )?\n\n (?:\n \\( # Opening bracket of multiple types with parenthesis {(string|number)}\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n (?:\n [\\.|~] # {Foo.bar} namespaced, {string|number} multiple, {Foo~bar} class-specific callback\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n )*\n \\) |\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n (?:\n [\\.|~] # {Foo.bar} namespaced, {string|number} multiple, {Foo~bar} class-specific callback\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n )*\n )\n # Check for suffix\n (?:\\[\\])? # {string[]} type application, an array of strings\n =? # {string=} optional parameter\n)})\n\\s+\n(?:-\\s+)? # optional hyphen before the description\n((?:(?!\\*\\/).)*) # The type description",
3278 "captures": {
3279 "0": {
3280 "name": "other.meta.jsdoc"
3281 },
3282 "1": {
3283 "name": "entity.name.type.instance.jsdoc"
3284 },
3285 "2": {
3286 "name": "other.description.jsdoc"
3287 }
3288 }
3289 }
3290 ]
3291 },
3292 "jsx-tag-attributes": {
3293 "patterns": [
3294 {
3295 "include": "#jsx-tag-attribute-name"
3296 },
3297 {
3298 "include": "#jsx-tag-attribute-assignment"
3299 },
3300 {
3301 "include": "#jsx-string-double-quoted"
3302 },
3303 {
3304 "include": "#jsx-string-single-quoted"
3305 },
3306 {
3307 "include": "#jsx-evaluated-code"
3308 }
3309 ]
3310 },
3311 "jsx-tag-attribute-name": {
3312 "match": "(?x)\n \\s*\n ([_$a-zA-Z][-$\\w]*)\n (?=\\s|=|/?>|/\\*|//)",
3313 "captures": {
3314 "1": {
3315 "name": "entity.other.attribute-name.js"
3316 }
3317 }
3318 },
3319 "jsx-tag-attribute-assignment": {
3320 "name": "keyword.operator.assignment.js",
3321 "match": "=(?=\\s*(?:'|\"|{|/\\*|//|\\n))"
3322 },
3323 "jsx-string-double-quoted": {
3324 "name": "string.quoted.double.js",
3325 "begin": "\"",
3326 "end": "\"",
3327 "beginCaptures": {
3328 "0": {
3329 "name": "punctuation.definition.string.begin.js"
3330 }
3331 },
3332 "endCaptures": {
3333 "0": {
3334 "name": "punctuation.definition.string.end.js"
3335 }
3336 },
3337 "patterns": [
3338 {
3339 "include": "#jsx-entities"
3340 }
3341 ]
3342 },
3343 "jsx-string-single-quoted": {
3344 "name": "string.quoted.single.js",
3345 "begin": "'",
3346 "end": "'",
3347 "beginCaptures": {
3348 "0": {
3349 "name": "punctuation.definition.string.begin.js"
3350 }
3351 },
3352 "endCaptures": {
3353 "0": {
3354 "name": "punctuation.definition.string.end.js"
3355 }
3356 },
3357 "patterns": [
3358 {
3359 "include": "#jsx-entities"
3360 }
3361 ]
3362 },
3363 "jsx-entities": {
3364 "patterns": [
3365 {
3366 "name": "constant.character.entity.js",
3367 "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
3368 "captures": {
3369 "1": {
3370 "name": "punctuation.definition.entity.js"
3371 },
3372 "3": {
3373 "name": "punctuation.definition.entity.js"
3374 }
3375 }
3376 },
3377 {
3378 "name": "invalid.illegal.bad-ampersand.js",
3379 "match": "&"
3380 }
3381 ]
3382 },
3383 "jsx-evaluated-code": {
3384 "name": "meta.embedded.expression.js",
3385 "begin": "{",
3386 "end": "}",
3387 "beginCaptures": {
3388 "0": {
3389 "name": "punctuation.section.embedded.begin.js"
3390 }
3391 },
3392 "endCaptures": {
3393 "0": {
3394 "name": "punctuation.section.embedded.end.js"
3395 }
3396 },
3397 "patterns": [
3398 {
3399 "include": "#expression"
3400 }
3401 ]
3402 },
3403 "jsx-tag-attributes-illegal": {
3404 "name": "invalid.illegal.attribute.js",
3405 "match": "\\S+"
3406 },
3407 "jsx-tag-without-attributes": {
3408 "name": "meta.tag.without-attributes.js",
3409 "begin": "(<)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>)",
3410 "end": "(</)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>)",
3411 "beginCaptures": {
3412 "1": {
3413 "name": "punctuation.definition.tag.begin.js"
3414 },
3415 "2": {
3416 "name": "entity.name.tag.js"
3417 },
3418 "3": {
3419 "name": "punctuation.definition.tag.end.js"
3420 }
3421 },
3422 "endCaptures": {
3423 "1": {
3424 "name": "punctuation.definition.tag.begin.js"
3425 },
3426 "2": {
3427 "name": "entity.name.tag.js"
3428 },
3429 "3": {
3430 "name": "punctuation.definition.tag.end.js"
3431 }
3432 },
3433 "contentName": "meta.jsx.children.tsx",
3434 "patterns": [
3435 {
3436 "include": "#jsx-children"
3437 }
3438 ]
3439 },
3440 "jsx-tag-in-expression": {
3441 "begin": "(?x)\n (?<=[({\\[,?=>]|&&|\\|\\||\\?|\\Wreturn|^return|\\Wdefault|^)\\s*\n (?!(<)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>)) #look ahead is not start of tag without attributes\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
3442 "end": "(/>)|(?:(</)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>))",
3443 "endCaptures": {
3444 "0": {
3445 "name": "meta.tag.js"
3446 },
3447 "1": {
3448 "name": "punctuation.definition.tag.end.js"
3449 },
3450 "2": {
3451 "name": "punctuation.definition.tag.begin.js"
3452 },
3453 "3": {
3454 "name": "entity.name.tag.js"
3455 },
3456 "4": {
3457 "name": "punctuation.definition.tag.end.js"
3458 }
3459 },
3460 "patterns": [
3461 {
3462 "include": "#jsx-tag"
3463 }
3464 ]
3465 },
3466 "jsx-child-tag": {
3467 "begin": "(?x)\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
3468 "end": "(/>)|(?:(</)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>))",
3469 "endCaptures": {
3470 "0": {
3471 "name": "meta.tag.js"
3472 },
3473 "1": {
3474 "name": "punctuation.definition.tag.end.js"
3475 },
3476 "2": {
3477 "name": "punctuation.definition.tag.begin.js"
3478 },
3479 "3": {
3480 "name": "entity.name.tag.js"
3481 },
3482 "4": {
3483 "name": "punctuation.definition.tag.end.js"
3484 }
3485 },
3486 "patterns": [
3487 {
3488 "include": "#jsx-tag"
3489 }
3490 ]
3491 },
3492 "jsx-tag": {
3493 "name": "meta.tag.js",
3494 "begin": "(?x)\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
3495 "end": "(?=(/>)|(?:(</)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>)))",
3496 "patterns": [
3497 {
3498 "begin": "(?x)\n (<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>)",
3499 "beginCaptures": {
3500 "1": {
3501 "name": "punctuation.definition.tag.begin.js"
3502 },
3503 "2": {
3504 "name": "entity.name.tag.js"
3505 }
3506 },
3507 "end": "(?=[/]?>)",
3508 "patterns": [
3509 {
3510 "include": "#comment"
3511 },
3512 {
3513 "include": "#jsx-tag-attributes"
3514 },
3515 {
3516 "include": "#jsx-tag-attributes-illegal"
3517 }
3518 ]
3519 },
3520 {
3521 "begin": "(>)",
3522 "beginCaptures": {
3523 "1": {
3524 "name": "punctuation.definition.tag.end.js"
3525 }
3526 },
3527 "end": "(?=</)",
3528 "contentName": "meta.jsx.children.tsx",
3529 "patterns": [
3530 {
3531 "include": "#jsx-children"
3532 }
3533 ]
3534 }
3535 ]
3536 },
3537 "jsx-tag-invalid": {
3538 "name": "invalid.illegal.tag.incomplete.js",
3539 "match": "<\\s*>"
3540 },
3541 "jsx-children": {
3542 "patterns": [
3543 {
3544 "include": "#jsx-tag-without-attributes"
3545 },
3546 {
3547 "include": "#jsx-child-tag"
3548 },
3549 {
3550 "include": "#jsx-tag-invalid"
3551 },
3552 {
3553 "include": "#jsx-evaluated-code"
3554 },
3555 {
3556 "include": "#jsx-entities"
3557 }
3558 ]
3559 },
3560 "jsx": {
3561 "patterns": [
3562 {
3563 "include": "#jsx-tag-without-attributes"
3564 },
3565 {
3566 "include": "#jsx-tag-in-expression"
3567 },
3568 {
3569 "include": "#jsx-tag-invalid"
3570 }
3571 ]
3572 }
3573 },
3574 "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/4d0bdebb93aadc25ecbb903ebc897e9cd5fab69c"
3575}