3# http://www.sublimetext.com/docs/3/syntax.html
12 - match: \A(#!).*(?=$)
13 scope: comment.line.shebang.ts
15 1: punctuation.definition.comment.ts
19 0: punctuation.definition.comment.ts
21 - meta_scope: comment.block.documentation.ts
24 0: punctuation.definition.comment.ts
27 - match: (/\*)(?:\s*((@)internal)(?=\s|(\*/)))?
29 1: punctuation.definition.comment.ts
30 2: storage.type.internaldeclaration.ts
31 3: punctuation.decorator.internaldeclaration.ts
33 - meta_scope: comment.block.ts
36 0: punctuation.definition.comment.ts
38 - match: '(^[ \t]+)?((//)(?:\s*((@)internal)(?=\s|$))?)'
40 1: punctuation.whitespace.comment.leading.ts
41 2: comment.line.double-slash.ts
42 3: punctuation.definition.comment.ts
43 4: storage.type.internaldeclaration.ts
44 5: punctuation.decorator.internaldeclaration.ts
46 - meta_content_scope: comment.line.double-slash.ts
50 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(abstract|public|protected|private|readonly|static|declare)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
51 scope: storage.modifier.ts
52 after-operator-block-as-object-literal:
53 - match: '(?<!\+\+|--)(?<=[:=(,\[?+!>]|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^yield|[^\._$[:alnum:]]yield|^throw|[^\._$[:alnum:]]throw|^in|[^\._$[:alnum:]]in|^of|[^\._$[:alnum:]]of|^typeof|[^\._$[:alnum:]]typeof|&&|\|\||\*)\s*(\{)'
55 1: punctuation.definition.block.ts
57 - meta_scope: meta.objectliteral.ts
60 0: punctuation.definition.block.ts
62 - include: object-member
63 array-binding-pattern:
64 - match: '(?:(\.\.\.)\s*)?(\[)'
66 1: keyword.operator.rest.ts
67 2: punctuation.definition.binding-pattern.array.ts
71 0: punctuation.definition.binding-pattern.array.ts
73 - include: binding-element
74 - include: punctuation-comma
75 array-binding-pattern-const:
76 - match: '(?:(\.\.\.)\s*)?(\[)'
78 1: keyword.operator.rest.ts
79 2: punctuation.definition.binding-pattern.array.ts
83 0: punctuation.definition.binding-pattern.array.ts
85 - include: binding-element-const
86 - include: punctuation-comma
90 1: meta.brace.square.ts
92 - meta_scope: meta.array.literal.ts
95 0: meta.brace.square.ts
98 - include: punctuation-comma
100 - match: '(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(\basync)\s+)?([_$[:alpha:]][_$[:alnum:]]*)\s*(?==>)'
103 1: storage.modifier.async.ts
104 2: variable.parameter.ts
107 (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(\basync)
110 # sure shot arrow functions even if => is on new line
112 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
113 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
116 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
120 # arrow function possible to detect only with => on same line
122 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
123 \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
124 (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
125 \s*=> # arrow operator
130 1: storage.modifier.async.ts
132 - meta_scope: meta.arrow.ts
133 - match: '(?==>|\{|(^\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\s+))'
136 - include: type-parameters
137 - include: function-parameters
138 - include: arrow-return-type
139 - include: possibly-arrow-return-type
142 0: storage.type.function.arrow.ts
144 - meta_scope: meta.arrow.ts
145 - match: '((?<=\}|\S)(?<!=>)|((?!\{)(?=\S)))(?!\/[\/\*])'
147 - include: single-line-comment-consuming-line-ending
148 - include: decl-block
149 - include: expression
151 - match: (?<=\))\s*(:)
153 1: keyword.operator.type.annotation.ts
155 - meta_scope: meta.return.type.arrow.ts
156 - match: '(?==>|\{|(^\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\s+))'
158 - include: arrow-return-type-body
159 arrow-return-type-body:
160 - match: '(?<=[:])(?=\s*\{)'
164 - include: type-object
165 - include: type-predicate-operator
168 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(async)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
169 scope: storage.modifier.async.ts
173 - include: numeric-literal
175 - include: object-binding-pattern
176 - include: array-binding-pattern
177 - include: destructuring-variable-rest
178 - include: variable-initializer
179 binding-element-const:
182 - include: numeric-literal
184 - include: object-binding-pattern-const
185 - include: array-binding-pattern-const
186 - include: destructuring-variable-rest-const
187 - include: variable-initializer
189 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))true(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
190 scope: constant.language.boolean.true.ts
191 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))false(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
192 scope: constant.language.boolean.false.ts
201 - match: '\]|(?=\*/)'
205 - match: \s*(<)\s*(const)\s*(>)
208 1: meta.brace.angle.ts
209 2: storage.modifier.ts
210 3: meta.brace.angle.ts
211 - match: '(?:(?<!\+\+|--)(?<=^return|[^\._$[:alnum:]]return|^throw|[^\._$[:alnum:]]throw|^yield|[^\._$[:alnum:]]yield|^await|[^\._$[:alnum:]]await|^default|[^\._$[:alnum:]]default|[=(,:>*?\&\|\^]|[^_$[:alnum:]](?:\+\+|\-\-)|[^\+]\+|[^\-]\-))\s*(<)(?!<?\=)(?!\s*$)'
213 1: meta.brace.angle.ts
215 - meta_scope: cast.expr.ts
218 1: meta.brace.angle.ts
221 - match: '(?:(?<=^))\s*(<)(?=[_$[:alpha:]][_$[:alnum:]]*\s*>)'
223 1: meta.brace.angle.ts
225 - meta_scope: cast.expr.ts
228 1: meta.brace.angle.ts
232 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(?:(abstract)\s+)?\b(class)\b(?=\s+|/[/*])'
234 1: keyword.control.export.ts
235 2: storage.modifier.ts
236 3: storage.modifier.ts
237 4: storage.type.class.ts
239 - meta_scope: meta.class.ts
242 - include: class-declaration-or-expression-patterns
243 class-declaration-or-expression-patterns:
245 - include: class-or-interface-heritage
246 - match: "[_$[:alpha:]][_$[:alnum:]]*"
248 0: entity.name.type.class.ts
249 - include: type-parameters
250 - include: class-or-interface-body
252 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(abstract)\s+)?(class)\b(?=\s+|[<{]|\/[\/*])'
254 1: storage.modifier.ts
255 2: storage.type.class.ts
257 - meta_scope: meta.class.ts
260 - include: class-declaration-or-expression-patterns
261 class-or-interface-body:
264 0: punctuation.definition.block.ts
268 0: punctuation.definition.block.ts
274 - match: '(?=\s|[;),}\]:\-\+]|;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
276 - include: expression
277 - include: method-declaration
278 - include: indexer-declaration
279 - include: field-declaration
281 - include: type-annotation
282 - include: variable-initializer
283 - include: access-modifier
284 - include: property-accessor
285 - include: async-modifier
286 - include: after-operator-block-as-object-literal
287 - include: decl-block
288 - include: expression
289 - include: punctuation-comma
290 - include: punctuation-semicolon
291 class-or-interface-heritage:
292 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(extends|implements)\b)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
294 1: storage.modifier.ts
299 - include: class-or-interface-heritage
300 - include: type-parameters
301 - include: expressionWithoutIdentifiers
302 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))(?=\s*[_$[:alpha:]][_$[:alnum:]]*(\s*\??\.\s*[_$[:alpha:]][_$[:alnum:]]*)*\s*)'
304 1: entity.name.type.module.ts
305 2: punctuation.accessor.ts
306 3: punctuation.accessor.optional.ts
307 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
309 1: entity.other.inherited-class.ts
310 - include: expressionPunctuations
312 - include: switch-statement
314 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(catch|finally|throw|try)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
315 scope: keyword.control.trycatch.ts
316 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(break|continue|goto)\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
318 1: keyword.control.loop.ts
319 2: entity.name.label.ts
320 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(break|continue|do|goto|while)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
321 scope: keyword.control.loop.ts
322 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(return)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
323 scope: keyword.control.flow.ts
324 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(case|default|switch)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
325 scope: keyword.control.switch.ts
326 - include: if-statement
327 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(else|if)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
328 scope: keyword.control.conditional.ts
329 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(with)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
330 scope: keyword.control.with.ts
331 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(package)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
332 scope: keyword.control.ts
333 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(debugger)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
334 scope: keyword.other.debugger.ts
338 0: punctuation.definition.block.ts
340 - meta_scope: meta.block.ts
343 0: punctuation.definition.block.ts
345 - include: statements
349 - include: function-declaration
350 - include: class-declaration
351 - include: interface-declaration
352 - include: enum-declaration
353 - include: namespace-declaration
354 - include: type-alias-declaration
355 - include: import-equals-declaration
356 - include: import-declaration
357 - include: export-declaration
358 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(declare|export)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
359 scope: storage.modifier.ts
361 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))\@'
363 0: punctuation.decorator.ts
365 - meta_scope: meta.decorator.ts
368 - include: expression
370 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\{)'
372 - meta_scope: meta.object-binding-pattern-variable.ts
373 - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
375 - include: object-binding-pattern-const
376 - include: type-annotation
378 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\[)'
380 - meta_scope: meta.array-binding-pattern-variable.ts
381 - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
383 - include: array-binding-pattern-const
384 - include: type-annotation
386 destructuring-parameter:
387 - match: '(?<!=|:)\s*(?:(\.\.\.)\s*)?(\{)'
389 1: keyword.operator.rest.ts
390 2: punctuation.definition.binding-pattern.object.ts
392 - meta_scope: meta.parameter.object-binding-pattern.ts
395 0: punctuation.definition.binding-pattern.object.ts
397 - include: parameter-object-binding-element
398 - match: '(?<!=|:)\s*(?:(\.\.\.)\s*)?(\[)'
400 1: keyword.operator.rest.ts
401 2: punctuation.definition.binding-pattern.array.ts
403 - meta_scope: meta.paramter.array-binding-pattern.ts
406 0: punctuation.definition.binding-pattern.array.ts
408 - include: parameter-binding-element
409 - include: punctuation-comma
410 destructuring-parameter-rest:
411 - match: '(?:(\.\.\.)\s*)?([_$[:alpha:]][_$[:alnum:]]*)'
413 1: keyword.operator.rest.ts
414 2: variable.parameter.ts
415 destructuring-variable:
416 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\{)'
418 - meta_scope: meta.object-binding-pattern-variable.ts
419 - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
421 - include: object-binding-pattern
422 - include: type-annotation
424 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\[)'
426 - meta_scope: meta.array-binding-pattern-variable.ts
427 - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
429 - include: array-binding-pattern
430 - include: type-annotation
432 destructuring-variable-rest:
433 - match: '(?:(\.\.\.)\s*)?([_$[:alpha:]][_$[:alnum:]]*)'
435 1: keyword.operator.rest.ts
436 2: meta.definition.variable.ts variable.other.readwrite.ts
437 destructuring-variable-rest-const:
438 - match: '(?:(\.\.\.)\s*)?([_$[:alpha:]][_$[:alnum:]]*)'
440 1: keyword.operator.rest.ts
441 2: meta.definition.variable.ts variable.other.constant.ts
443 - match: '^(///)\s*(?=<(reference|amd-dependency|amd-module)(\s+(path|types|no-default-lib|lib|name)\s*=\s*((\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)))+\s*/>\s*$)'
445 1: punctuation.definition.comment.ts
447 - meta_scope: comment.line.triple-slash.directive.ts
450 - match: (<)(reference|amd-dependency|amd-module)
452 1: punctuation.definition.tag.directive.ts
453 2: entity.name.tag.directive.ts
455 - meta_scope: meta.tag.ts
458 0: punctuation.definition.tag.directive.ts
460 - match: path|types|no-default-lib|lib|name
461 scope: entity.other.attribute-name.directive.ts
463 scope: keyword.operator.assignment.ts
470 (private|protected|public)
473 1: storage.type.class.jsdoc
474 2: punctuation.definition.block.tag.jsdoc
475 3: constant.language.access-type.jsdoc
491 1: storage.type.class.jsdoc
492 2: punctuation.definition.block.tag.jsdoc
493 3: entity.name.type.instance.jsdoc
494 4: punctuation.definition.bracket.angle.begin.jsdoc
495 5: constant.other.email.link.underline.jsdoc
496 6: punctuation.definition.bracket.angle.end.jsdoc
500 ((?:[^@\s*/]|\*[^/])+) # <that namepath>
502 ((?:[^@\s*/]|\*[^/])+) # <this namepath>
504 1: storage.type.class.jsdoc
505 2: punctuation.definition.block.tag.jsdoc
506 3: entity.name.type.instance.jsdoc
507 4: keyword.operator.control.jsdoc
508 5: entity.name.type.instance.jsdoc
509 - match: ((@)example)\s+
511 1: storage.type.class.jsdoc
512 2: punctuation.definition.block.tag.jsdoc
514 - meta_scope: meta.example.jsdoc
518 - match: \G(<)caption(>)
520 0: entity.name.tag.inline.jsdoc
521 1: punctuation.definition.bracket.angle.begin.jsdoc
522 2: punctuation.definition.bracket.angle.end.jsdoc
524 - meta_content_scope: constant.other.description.jsdoc
525 - match: (</)caption(>)|(?=\*/)
527 0: entity.name.tag.inline.jsdoc
528 1: punctuation.definition.bracket.angle.begin.jsdoc
529 2: punctuation.definition.bracket.angle.end.jsdoc
531 - match: '[^\s@*](?:[^*]|\*[^/])*'
533 0: source.embedded.ts
534 - match: (?x) ((@)kind) \s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \b
536 1: storage.type.class.jsdoc
537 2: punctuation.definition.block.tag.jsdoc
538 3: constant.language.symbol-type.jsdoc
553 # Avoid matching bare URIs (also acceptable as links)
556 # Avoid matching {@inline tags}; we match those below
557 (?:\[[^\[\]]*\])? # Possible description [preceding]{@tag}
558 {@(?:link|linkcode|linkplain|tutorial)\b
565 1: storage.type.class.jsdoc
566 2: punctuation.definition.block.tag.jsdoc
567 3: variable.other.link.underline.jsdoc
568 4: entity.name.type.instance.jsdoc
573 # One or more valid identifiers
575 [A-Za-z_$] # First character: non-numeric word character
576 [\w$.\[\]]* # Rest of identifier
577 (?: # Possible list of additional identifiers
584 1: storage.type.class.jsdoc
585 2: punctuation.definition.block.tag.jsdoc
586 3: variable.other.jsdoc
591 (?:arg|argument|const|constant|member|namespace|param|var)
599 1: storage.type.class.jsdoc
600 2: punctuation.definition.block.tag.jsdoc
601 3: variable.other.jsdoc
602 - match: '((@)typedef)\s+(?={)'
604 1: storage.type.class.jsdoc
605 2: punctuation.definition.block.tag.jsdoc
607 - match: '(?=\s|\*/|[^{}\[\]A-Za-z_$])'
610 - match: '(?:[^@\s*/]|\*[^/])+'
611 scope: entity.name.type.instance.jsdoc
612 - match: '((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\s+(?={)'
614 1: storage.type.class.jsdoc
615 2: punctuation.definition.block.tag.jsdoc
617 - match: '(?=\s|\*/|[^{}\[\]A-Za-z_$])'
620 - match: '([A-Za-z_$][\w$.\[\]]*)'
621 scope: variable.other.jsdoc
627 (?:\[\])? # Foo[ ].bar properties within an array
628 \. # Foo.Bar namespaced parameter
633 (=) # [foo=bar] Default parameter value
636 # The inner regexes are to stop the match early at */ and to not stop at escaped quotes
638 "(?:(?:\*(?!/))|(?:\\(?!"))|[^*\\])*?" | # [foo="bar"] Double-quoted
639 '(?:(?:\*(?!/))|(?:\\(?!'))|[^*\\])*?' | # [foo='bar'] Single-quoted
640 \[ (?:(?:\*(?!/))|[^*])*? \] | # [foo=[1,2]] Array literal
641 (?:(?:\*(?!/))|\s(?!\s*\])|\[.*?(?:\]|(?=\*/))|[^*\s\[\]])* # Everything else
645 \s*(?:(\])((?:[^*\s]|\*[^\s/])+)?|(?=\*/))
646 scope: variable.other.jsdoc
648 1: punctuation.definition.optional-value.begin.bracket.square.jsdoc
649 2: keyword.operator.assignment.jsdoc
650 3: source.embedded.ts
651 4: punctuation.definition.optional-value.end.bracket.square.jsdoc
652 5: invalid.illegal.syntax.jsdoc
657 (?:define|enum|exception|export|extends|lends|implements|modifies
658 |namespace|private|protected|returns?|suppress|this|throws|type
663 1: storage.type.class.jsdoc
664 2: punctuation.definition.block.tag.jsdoc
666 - match: '(?=\s|\*/|[^{}\[\]A-Za-z_$])'
673 (?:alias|augments|callback|constructs|emits|event|fires|exports?
674 |extends|external|function|func|host|lends|listens|interface|memberof!?
675 |method|module|mixes|mixin|name|requires|see|this|typedef|uses)
684 1: storage.type.class.jsdoc
685 2: punctuation.definition.block.tag.jsdoc
686 3: entity.name.type.instance.jsdoc
687 - match: '((@)(?:default(?:value)?|license|version))\s+(([''''"]))'
689 1: storage.type.class.jsdoc
690 2: punctuation.definition.block.tag.jsdoc
691 3: variable.other.jsdoc
692 4: punctuation.definition.string.begin.jsdoc
694 - meta_content_scope: variable.other.jsdoc
695 - match: (\3)|(?=$|\*/)
697 0: variable.other.jsdoc
698 1: punctuation.definition.string.end.jsdoc
700 - match: '((@)(?:default(?:value)?|license|tutorial|variation|version))\s+([^\s*]+)'
702 1: storage.type.class.jsdoc
703 2: punctuation.definition.block.tag.jsdoc
704 3: variable.other.jsdoc
705 - match: '(?x) (@) (?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc |inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method |mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects |override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected |public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary |suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation |version|virtual|writeOnce|yields?) \b'
706 scope: storage.type.class.jsdoc
708 1: punctuation.definition.block.tag.jsdoc
709 - include: inline-tags
710 - match: '((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\s+)'
712 1: storage.type.class.jsdoc
713 2: punctuation.definition.block.tag.jsdoc
715 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?(?:\b(const)\s+)?\b(enum)\s+([_$[:alpha:]][_$[:alnum:]]*)'
717 1: keyword.control.export.ts
718 2: storage.modifier.ts
719 3: storage.modifier.ts
720 4: storage.type.enum.ts
721 5: entity.name.type.enum.ts
723 - meta_scope: meta.enum.declaration.ts
729 0: punctuation.definition.block.ts
733 0: punctuation.definition.block.ts
736 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
738 0: variable.other.enummember.ts
740 - match: '(?=,|\}|$)'
743 - include: variable-initializer
744 - match: '(?=((\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\])))'
746 - match: '(?=,|\}|$)'
749 - include: array-literal
751 - include: variable-initializer
752 - include: punctuation-comma
754 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)\s+(as)\s+(namespace)\s+([_$[:alpha:]][_$[:alnum:]]*)'
756 1: keyword.control.export.ts
757 2: keyword.control.as.ts
758 3: storage.type.namespace.ts
759 4: entity.name.type.module.ts
760 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)(?:\s+(type))?(?:(?:\s*(=))|(?:\s+(default)(?=\s+)))'
762 1: keyword.control.export.ts
763 2: keyword.control.type.ts
764 3: keyword.operator.assignment.ts
765 4: keyword.control.default.ts
767 - meta_scope: meta.export.default.ts
768 - match: (?=$|;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))
770 - include: interface-declaration
771 - include: expression
772 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)(?:\s+(type))?\b(?!(\$)|(\s*:))((?=\s*[\{*])|((?=\s*[_$[:alpha:]][_$[:alnum:]]*(\s|,))(?!\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b)))'
774 1: keyword.control.export.ts
775 2: keyword.control.type.ts
777 - meta_scope: meta.export.ts
778 - match: (?=$|;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))
780 - include: import-export-declaration
782 - include: expressionWithoutIdentifiers
783 - include: identifiers
784 - include: expressionPunctuations
785 expression-inside-possibly-arrow-parens:
786 - include: expressionWithoutIdentifiers
790 - include: destructuring-parameter
791 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|protected|private|readonly)\s+(?=(public|protected|private|readonly)\s+)'
793 1: storage.modifier.ts
795 (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*
796 # function assignment |
801 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
804 ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
805 # sure shot arrow functions even if => is on new line
807 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
808 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
811 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
815 # arrow function possible to detect only with => on same line
817 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
818 \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
819 (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
820 \s*=> # arrow operator
824 # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>
836 (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
837 (:\s*((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
838 (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
842 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
845 ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
846 # sure shot arrow functions even if => is on new line
848 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
849 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
852 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
856 # arrow function possible to detect only with => on same line
858 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
859 \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
860 (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
861 \s*=> # arrow operator
866 1: storage.modifier.ts
867 2: keyword.operator.rest.ts
868 3: entity.name.function.ts variable.language.this.ts
869 4: entity.name.function.ts
870 5: keyword.operator.optional.ts
871 - match: '(?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*[:,]|$)'
873 1: storage.modifier.ts
874 2: keyword.operator.rest.ts
875 3: variable.parameter.ts variable.language.this.ts
876 4: variable.parameter.ts
877 5: keyword.operator.optional.ts
878 - include: type-annotation
879 - include: variable-initializer
881 scope: punctuation.separator.parameter.ts
882 - include: identifiers
883 - include: expressionPunctuations
884 expression-operators:
885 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(await)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
886 scope: keyword.control.flow.ts
887 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(yield)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))(?=\s*\/\*([^\*]|(\*[^\/]))*\*\/\s*\*)'
889 1: keyword.control.flow.ts
893 0: keyword.generator.asterisk.ts
896 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(yield)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))(?:\s*(\*))?'
898 1: keyword.control.flow.ts
899 2: keyword.generator.asterisk.ts
900 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))delete(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
901 scope: keyword.operator.expression.delete.ts
902 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))in(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))(?!\()'
903 scope: keyword.operator.expression.in.ts
904 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))of(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))(?!\()'
905 scope: keyword.operator.expression.of.ts
906 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))instanceof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
907 scope: keyword.operator.expression.instanceof.ts
908 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))new(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
909 scope: keyword.operator.new.ts
910 - include: typeof-operator
911 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))void(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
912 scope: keyword.operator.expression.void.ts
913 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+(const)(?=\s*($|[;,:})\]]))'
915 1: keyword.control.as.ts
916 2: storage.modifier.ts
917 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+'
919 1: keyword.control.as.ts
921 - match: '(?=$|^|[;,:})\]]|\|\||\&\&|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+)|(\s+\<))'
925 scope: keyword.operator.spread.ts
926 - match: \*=|(?<!\()/=|%=|\+=|\-=
927 scope: keyword.operator.assignment.compound.ts
928 - match: \&=|\^=|<<=|>>=|>>>=|\|=
929 scope: keyword.operator.assignment.compound.bitwise.ts
931 scope: keyword.operator.bitwise.shift.ts
932 - match: "===|!==|==|!="
933 scope: keyword.operator.comparison.ts
934 - match: <=|>=|<>|<|>
935 scope: keyword.operator.relational.ts
936 - match: '(\!)\s*(/)(?![/*])'
938 1: keyword.operator.logical.ts
939 2: keyword.operator.arithmetic.ts
940 - match: \!|&&|\|\||\?\?
941 scope: keyword.operator.logical.ts
943 scope: keyword.operator.bitwise.ts
945 scope: keyword.operator.assignment.ts
947 scope: keyword.operator.decrement.ts
949 scope: keyword.operator.increment.ts
950 - match: '%|\*|/|-|\+'
951 scope: keyword.operator.arithmetic.ts
952 - match: '(?<=[_$[:alnum:])\]])\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)+(/)(?![/*]))'
954 - match: '(/)(?!\*([^\*]|(\*[^\/]))*\*\/)'
956 1: keyword.operator.arithmetic.ts
959 - match: '(?<=[_$[:alnum:])\]])\s*(/)(?![/*])'
961 1: keyword.operator.arithmetic.ts
962 expressionPunctuations:
963 - include: punctuation-comma
964 - include: punctuation-accessor
965 expressionWithoutIdentifiers:
969 - include: function-expression
970 - include: class-expression
971 - include: arrow-function
972 - include: paren-expression-possibly-arrow
974 - include: ternary-expression
976 - include: instanceof-expr
977 - include: object-literal
978 - include: expression-operators
979 - include: function-call
981 - include: support-objects
982 - include: paren-expression
985 (?x)(?<!\()(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(readonly)\s+)?(?=\s*((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?:
986 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
987 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
988 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
989 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
990 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
991 (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
992 (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
993 (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
994 )(?!\$))|(\#?[_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(?:(?:(\?)|(\!))\s*)?(=|:|;|,|\}|$))
996 1: storage.modifier.ts
998 - meta_scope: meta.field.declaration.ts
1000 (?x)(?=\}|;|,|$|(^(?!\s*((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?:
1001 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1002 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1003 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1004 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1005 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1006 (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1007 (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1008 (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1009 )(?!\$))|(\#?[_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(?:(?:(\?)|(\!))\s*)?(=|:|;|,|$))))|(?<=\})
1011 - include: variable-initializer
1012 - include: type-annotation
1014 - include: array-literal
1015 - include: numeric-literal
1018 (?x)(\#?[_$[:alpha:]][_$[:alnum:]]*)(?:(\?)|(\!))?(?=\s*\s*
1019 # function assignment |
1022 (function\s*[(<*]) |
1024 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1027 ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
1028 # sure shot arrow functions even if => is on new line
1030 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
1031 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
1034 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
1038 # arrow function possible to detect only with => on same line
1040 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
1041 \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
1042 (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
1043 \s*=> # arrow operator
1047 # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>
1059 (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
1060 (:\s*((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
1061 (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
1063 (function\s*[(<*]) |
1065 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1068 ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
1069 # sure shot arrow functions even if => is on new line
1071 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
1072 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
1075 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
1079 # arrow function possible to detect only with => on same line
1081 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
1082 \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
1083 (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
1084 \s*=> # arrow operator
1089 1: meta.definition.property.ts entity.name.function.ts
1090 2: keyword.operator.optional.ts
1091 3: keyword.operator.definiteassignment.ts
1092 - match: '\#?[_$[:alpha:]][_$[:alnum:]]*'
1093 scope: meta.definition.property.ts variable.object.property.ts
1095 scope: keyword.operator.optional.ts
1097 scope: keyword.operator.definiteassignment.ts
1099 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))for(?=((\s+|(\s*\/\*([^\*]|(\*[^\/]))*\*\/\s*))await)?\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)?(\())'
1101 0: keyword.control.loop.ts
1107 scope: keyword.control.loop.ts
1110 0: meta.brace.round.ts
1114 0: meta.brace.round.ts
1117 - include: expression
1118 - include: punctuation-semicolon
1121 - include: type-parameters
1122 - include: function-parameters
1123 - include: return-type
1124 - include: decl-block
1126 scope: keyword.generator.asterisk.ts
1128 - match: '(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\)]))\s*(?:(\?\.\s*)|(\!))?(<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?\()'
1130 - match: '(?<=\))(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\)]))\s*(?:(\?\.\s*)|(\!))?(<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?\()'
1132 - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))'
1134 - meta_scope: meta.function-call.ts
1135 - match: '(?=\s*(?:(\?\.\s*)|(\!))?(<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?\()'
1137 - include: support-function-call-identifiers
1138 - match: '(\#?[_$[:alpha:]][_$[:alnum:]]*)'
1139 scope: entity.name.function.ts
1142 scope: meta.function-call.ts punctuation.accessor.optional.ts
1144 scope: meta.function-call.ts keyword.operator.definiteassignment.ts
1145 - include: type-arguments
1146 - include: paren-expression
1147 function-declaration:
1148 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?(?:(async)\s+)?(function\b)(?:\s*(\*))?(?:(?:\s+|(?<=\*))([_$[:alpha:]][_$[:alnum:]]*))?\s*'
1150 1: keyword.control.export.ts
1151 2: storage.modifier.ts
1152 3: storage.modifier.async.ts
1153 4: storage.type.function.ts
1154 5: keyword.generator.asterisk.ts
1155 6: meta.definition.function.ts entity.name.function.ts
1157 - meta_scope: meta.function.ts
1158 - match: '(?=;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))|(?<=\})'
1160 - include: function-name
1161 - include: function-body
1162 function-expression:
1163 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(async)\s+)?(function\b)(?:\s*(\*))?(?:(?:\s+|(?<=\*))([_$[:alpha:]][_$[:alnum:]]*))?\s*'
1165 1: storage.modifier.async.ts
1166 2: storage.type.function.ts
1167 3: keyword.generator.asterisk.ts
1168 4: meta.definition.function.ts entity.name.function.ts
1170 - meta_scope: meta.function.expression.ts
1171 - match: '(?=;)|(?<=\})'
1173 - include: function-name
1174 - include: single-line-comment-consuming-line-ending
1175 - include: function-body
1177 - match: "[_$[:alpha:]][_$[:alnum:]]*"
1178 scope: meta.definition.function.ts entity.name.function.ts
1179 function-parameters:
1182 0: punctuation.definition.parameters.begin.ts
1184 - meta_scope: meta.parameters.ts
1187 0: punctuation.definition.parameters.end.ts
1189 - include: function-parameters-body
1190 function-parameters-body:
1193 - include: decorator
1194 - include: destructuring-parameter
1195 - include: parameter-name
1196 - include: parameter-type-annotation
1197 - include: variable-initializer
1199 scope: punctuation.separator.parameter.ts
1201 - include: object-identifiers
1203 (?x)(?:(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\s*=\s*(
1205 (function\s*[(<*]) |
1207 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1210 ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
1211 # sure shot arrow functions even if => is on new line
1213 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
1214 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
1217 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
1221 # arrow function possible to detect only with => on same line
1223 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
1224 \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
1225 (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
1226 \s*=> # arrow operator
1231 1: punctuation.accessor.ts
1232 2: punctuation.accessor.optional.ts
1233 3: entity.name.function.ts
1234 - match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])'
1236 1: punctuation.accessor.ts
1237 2: punctuation.accessor.optional.ts
1238 3: variable.other.constant.property.ts
1239 - match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(\#?[_$[:alpha:]][_$[:alnum:]]*)'
1241 1: punctuation.accessor.ts
1242 2: punctuation.accessor.optional.ts
1243 3: variable.other.property.ts
1244 - match: "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
1245 scope: variable.other.constant.ts
1246 - match: "[_$[:alpha:]][_$[:alnum:]]*"
1247 scope: variable.other.readwrite.ts
1249 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?=\bif\s*(\(([^\(\)]|(\([^\(\)]*\)))*\))\s*(?!\{))'
1251 - match: '(?=;|$|\})'
1254 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(if)\s*(\()'
1256 1: keyword.control.conditional.ts
1257 2: meta.brace.round.ts
1261 0: meta.brace.round.ts
1263 - include: expression
1264 - match: '(?<=\))\s*\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)+\])+\/([gimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))'
1266 0: punctuation.definition.string.begin.ts
1268 - meta_scope: string.regexp.ts
1269 - match: "(/)([gimsuy]*)"
1271 1: punctuation.definition.string.end.ts
1275 - include: statements
1277 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)(?:\s+(type)(?!\s+from))?(?!\s*[:\(])(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1279 1: keyword.control.export.ts
1280 2: storage.modifier.ts
1281 3: keyword.control.import.ts
1282 4: keyword.control.type.ts
1284 - meta_scope: meta.import.ts
1285 - match: '(?<!^import|[^\._$[:alnum:]]import)(?=;|$|^)'
1287 - include: single-line-comment-consuming-line-ending
1290 - match: '(?<=^import|[^\._$[:alnum:]]import)(?!\s*["''])'
1294 0: keyword.control.from.ts
1296 - include: import-export-declaration
1297 - include: import-export-declaration
1298 import-equals-declaration:
1299 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)(?:\s+(type))?\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(require)\s*(\()'
1301 1: keyword.control.export.ts
1302 2: storage.modifier.ts
1303 3: keyword.control.import.ts
1304 4: keyword.control.type.ts
1305 5: variable.other.readwrite.alias.ts
1306 6: keyword.operator.assignment.ts
1307 7: keyword.control.require.ts
1308 8: meta.brace.round.ts
1310 - meta_scope: meta.import-equals.external.ts
1313 0: meta.brace.round.ts
1317 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)(?:\s+(type))?\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(?!require\b)'
1319 1: keyword.control.export.ts
1320 2: storage.modifier.ts
1321 3: keyword.control.import.ts
1322 4: keyword.control.type.ts
1323 5: variable.other.readwrite.alias.ts
1324 6: keyword.operator.assignment.ts
1326 - meta_scope: meta.import-equals.internal.ts
1329 - include: single-line-comment-consuming-line-ending
1331 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))'
1333 1: entity.name.type.module.ts
1334 2: punctuation.accessor.ts
1335 3: punctuation.accessor.optional.ts
1336 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
1337 scope: variable.other.readwrite.ts
1338 import-export-block:
1341 0: punctuation.definition.block.ts
1343 - meta_scope: meta.block.ts
1346 0: punctuation.definition.block.ts
1348 - include: import-export-clause
1349 import-export-clause:
1351 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bdefault)|(\*)|(\b[_$[:alpha:]][_$[:alnum:]]*))\s+(as)\s+(?:(default(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|([_$[:alpha:]][_$[:alnum:]]*))'
1353 1: keyword.control.default.ts
1354 2: constant.language.import-export-all.ts
1355 3: variable.other.readwrite.ts
1356 4: keyword.control.as.ts
1357 5: keyword.control.default.ts
1358 6: variable.other.readwrite.alias.ts
1359 - include: punctuation-comma
1361 scope: constant.language.import-export-all.ts
1362 - match: \b(default)\b
1363 scope: keyword.control.default.ts
1364 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
1365 scope: variable.other.readwrite.alias.ts
1366 import-export-declaration:
1369 - include: import-export-block
1371 scope: keyword.control.from.ts
1372 - include: import-export-clause
1373 indexer-declaration:
1374 - match: '(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(readonly)\s*)?\s*(\[)\s*([_$[:alpha:]][_$[:alnum:]]*)\s*(?=:)'
1376 1: storage.modifier.ts
1377 2: meta.brace.square.ts
1378 3: variable.parameter.ts
1380 - meta_scope: meta.indexer.declaration.ts
1381 - match: '(\])\s*(\?\s*)?|$'
1383 1: meta.brace.square.ts
1384 2: keyword.operator.optional.ts
1386 - include: type-annotation
1387 indexer-mapped-type-declaration:
1388 - match: '(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))([+-])?(readonly)\s*)?\s*(\[)\s*([_$[:alpha:]][_$[:alnum:]]*)\s+(in)\s+'
1390 1: keyword.operator.type.modifier.ts
1391 2: storage.modifier.ts
1392 3: meta.brace.square.ts
1393 4: entity.name.type.ts
1394 5: keyword.operator.expression.in.ts
1396 - meta_scope: meta.indexer.mappedtype.declaration.ts
1397 - match: '(\])([+-])?\s*(\?\s*)?|$'
1399 1: meta.brace.square.ts
1400 2: keyword.operator.type.modifier.ts
1401 3: keyword.operator.optional.ts
1405 - match: '(\[)[^\]]+(\])(?={@(?:link|linkcode|linkplain|tutorial))'
1406 scope: constant.other.description.jsdoc
1408 1: punctuation.definition.bracket.square.begin.jsdoc
1409 2: punctuation.definition.bracket.square.end.jsdoc
1410 - match: '({)((@)(?:link(?:code|plain)?|tutorial))\s*'
1412 1: punctuation.definition.bracket.curly.begin.jsdoc
1413 2: storage.type.class.jsdoc
1414 3: punctuation.definition.inline.tag.jsdoc
1416 - meta_scope: entity.name.type.instance.jsdoc
1417 - match: '}|(?=\*/)'
1419 0: punctuation.definition.bracket.curly.end.jsdoc
1421 - match: '\G((?=https?://)(?:[^|}\s*]|\*[/])+)(\|)?'
1423 1: variable.other.link.underline.jsdoc
1424 2: punctuation.separator.pipe.jsdoc
1425 - match: '\G((?:[^{}@\s|*]|\*[^/])+)(\|)?'
1427 1: variable.other.description.jsdoc
1428 2: punctuation.separator.pipe.jsdoc
1430 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(instanceof)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1432 1: keyword.operator.expression.instanceof.ts
1434 - match: '(?<=\))|(?=[;),}\]:?]|\|\||\&\&|$|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))function((\s+[_$[:alpha:]][_$[:alnum:]]*)|(\s*[\(]))))'
1437 interface-declaration:
1438 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(?:(abstract)\s+)?\b(interface)\b(?=\s+|/[/*])'
1440 1: keyword.control.export.ts
1441 2: storage.modifier.ts
1442 3: storage.modifier.ts
1443 4: storage.type.interface.ts
1445 - meta_scope: meta.interface.ts
1449 - include: class-or-interface-heritage
1450 - match: "[_$[:alpha:]][_$[:alnum:]]*"
1452 0: entity.name.type.interface.ts
1453 - include: type-parameters
1454 - include: class-or-interface-body
1456 - match: '\G{(?:[^}*]|\*[^/}])+$'
1457 scope: invalid.illegal.type.jsdoc
1460 0: entity.name.type.instance.jsdoc
1461 1: punctuation.definition.bracket.curly.begin.jsdoc
1463 - meta_content_scope: entity.name.type.instance.jsdoc
1464 - match: '((}))\s*|(?=\*/)'
1466 1: entity.name.type.instance.jsdoc
1467 2: punctuation.definition.bracket.curly.end.jsdoc
1471 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(:)(?=\s*\{)'
1473 1: entity.name.label.ts
1474 2: punctuation.separator.label.ts
1478 - include: decl-block
1479 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(:)'
1481 1: entity.name.label.ts
1482 2: punctuation.separator.label.ts
1484 - include: numeric-literal
1485 - include: boolean-literal
1486 - include: null-literal
1487 - include: undefined-literal
1488 - include: numericConstant-literal
1489 - include: array-literal
1490 - include: this-literal
1491 - include: super-literal
1493 - match: '(?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?\s*\b(constructor)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1495 1: storage.modifier.ts
1496 2: storage.modifier.ts
1497 3: storage.modifier.async.ts
1500 - meta_scope: meta.method.declaration.ts
1501 - match: '(?=\}|;|,|$)|(?<=\})'
1503 - include: method-declaration-name
1504 - include: function-body
1505 - match: '(?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?(?:(?:\s*\b(new)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|(?:(\*)\s*)?)(?=\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(])'
1507 1: storage.modifier.ts
1508 2: storage.modifier.ts
1509 3: storage.modifier.async.ts
1510 4: keyword.operator.new.ts
1511 5: keyword.generator.asterisk.ts
1513 - meta_scope: meta.method.declaration.ts
1514 - match: '(?=\}|;|,|$)|(?<=\})'
1516 - include: method-declaration-name
1517 - include: function-body
1519 (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?(?:\b(get|set)\s+)?(?:(\*)\s*)?(?=\s*(((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?:
1520 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1521 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1522 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1523 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1524 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1525 (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1526 (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1527 (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1528 )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(])
1530 1: storage.modifier.ts
1531 2: storage.modifier.ts
1532 3: storage.modifier.async.ts
1533 4: storage.type.property.ts
1534 5: keyword.generator.asterisk.ts
1536 - meta_scope: meta.method.declaration.ts
1537 - match: '(?=\}|;|,|$)|(?<=\})'
1539 - include: method-declaration-name
1540 - include: function-body
1541 method-declaration-name:
1543 (?x)(?=((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?:
1544 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1545 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1546 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1547 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1548 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1549 (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1550 (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1551 (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1552 )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??)\s*[\(\<])
1557 - include: array-literal
1558 - include: numeric-literal
1559 - match: "[_$[:alpha:]][_$[:alnum:]]*"
1560 scope: meta.definition.method.ts entity.name.function.ts
1562 scope: keyword.operator.optional.ts
1563 namespace-declaration:
1564 - match: '(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(namespace|module)\s+(?=[_$[:alpha:]"''`]))'
1566 1: keyword.control.export.ts
1567 2: storage.modifier.ts
1568 3: storage.type.namespace.ts
1570 - meta_scope: meta.namespace.declaration.ts
1571 - match: '(?<=\})|(?=;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
1575 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
1576 scope: entity.name.type.module.ts
1577 - include: punctuation-accessor
1578 - include: decl-block
1580 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(new)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1582 1: keyword.operator.new.ts
1584 - meta_scope: new.expr.ts
1585 - match: '(?<=\))|(?=[;),}\]:\-\+]|\|\||\&\&|$|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))new(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))function((\s+[_$[:alpha:]][_$[:alnum:]]*)|(\s*[\(]))))'
1587 - include: paren-expression
1588 - include: class-declaration
1591 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))null(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1592 scope: constant.language.null.ts
1594 - match: '\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$)'
1595 scope: constant.numeric.hex.ts
1597 1: storage.type.numeric.bigint.ts
1598 - match: '\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$)'
1599 scope: constant.numeric.binary.ts
1601 1: storage.type.numeric.bigint.ts
1602 - match: '\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$)'
1603 scope: constant.numeric.octal.ts
1605 1: storage.type.numeric.bigint.ts
1609 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1610 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1611 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1612 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1613 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1614 (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1615 (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1616 (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1619 0: constant.numeric.decimal.ts
1620 1: meta.delimiter.decimal.period.ts
1621 2: storage.type.numeric.bigint.ts
1622 3: meta.delimiter.decimal.period.ts
1623 4: storage.type.numeric.bigint.ts
1624 5: meta.delimiter.decimal.period.ts
1625 6: storage.type.numeric.bigint.ts
1626 7: storage.type.numeric.bigint.ts
1627 8: meta.delimiter.decimal.period.ts
1628 9: storage.type.numeric.bigint.ts
1629 10: meta.delimiter.decimal.period.ts
1630 11: storage.type.numeric.bigint.ts
1631 12: meta.delimiter.decimal.period.ts
1632 13: storage.type.numeric.bigint.ts
1633 14: storage.type.numeric.bigint.ts
1634 numericConstant-literal:
1635 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))NaN(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1636 scope: constant.language.nan.ts
1637 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Infinity(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1638 scope: constant.language.infinity.ts
1639 object-binding-element:
1642 (?x)(?=((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?:
1643 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1644 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1645 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1646 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1647 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1648 (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1649 (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1650 (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1651 )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
1655 - include: object-binding-element-propertyName
1656 - include: binding-element
1657 - include: object-binding-pattern
1658 - include: destructuring-variable-rest
1659 - include: variable-initializer
1660 - include: punctuation-comma
1661 object-binding-element-const:
1664 (?x)(?=((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?:
1665 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1666 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1667 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1668 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1669 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1670 (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1671 (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1672 (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1673 )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
1677 - include: object-binding-element-propertyName
1678 - include: binding-element-const
1679 - include: object-binding-pattern-const
1680 - include: destructuring-variable-rest-const
1681 - include: variable-initializer
1682 - include: punctuation-comma
1683 object-binding-element-propertyName:
1685 (?x)(?=((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?:
1686 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1687 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1688 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1689 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1690 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1691 (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1692 (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1693 (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1694 )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
1698 0: punctuation.destructuring.ts
1701 - include: array-literal
1702 - include: numeric-literal
1703 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
1704 scope: variable.object.property.ts
1705 object-binding-pattern:
1706 - match: '(?:(\.\.\.)\s*)?(\{)'
1708 1: keyword.operator.rest.ts
1709 2: punctuation.definition.binding-pattern.object.ts
1713 0: punctuation.definition.binding-pattern.object.ts
1715 - include: object-binding-element
1716 object-binding-pattern-const:
1717 - match: '(?:(\.\.\.)\s*)?(\{)'
1719 1: keyword.operator.rest.ts
1720 2: punctuation.definition.binding-pattern.object.ts
1724 0: punctuation.definition.binding-pattern.object.ts
1726 - include: object-binding-element-const
1728 - match: '([_$[:alpha:]][_$[:alnum:]]*)(?=\s*\??\.\s*prototype\b(?!\$))'
1729 scope: support.class.ts
1731 (?x)(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(?:
1732 (\#?[[:upper:]][_$[:digit:][:upper:]]*) |
1733 (\#?[_$[:alpha:]][_$[:alnum:]]*)
1734 )(?=\s*\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*)
1736 1: punctuation.accessor.ts
1737 2: punctuation.accessor.optional.ts
1738 3: variable.other.constant.object.property.ts
1739 4: variable.other.object.property.ts
1742 ([[:upper:]][_$[:digit:][:upper:]]*) |
1743 ([_$[:alpha:]][_$[:alnum:]]*)
1744 )(?=\s*\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*)
1746 1: variable.other.constant.object.ts
1747 2: variable.other.object.ts
1751 0: punctuation.definition.block.ts
1753 - meta_scope: meta.objectliteral.ts
1756 0: punctuation.definition.block.ts
1758 - include: object-member
1759 object-literal-method-declaration:
1761 (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(async)\s+)?(?:\b(get|set)\s+)?(?:(\*)\s*)?(?=\s*(((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?:
1762 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1763 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1764 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1765 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1766 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1767 (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1768 (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1769 (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1770 )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(])
1772 1: storage.modifier.async.ts
1773 2: storage.type.property.ts
1774 3: keyword.generator.asterisk.ts
1776 - meta_scope: meta.method.declaration.ts
1777 - match: '(?=\}|;|,)|(?<=\})'
1779 - include: method-declaration-name
1780 - include: function-body
1782 (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(async)\s+)?(?:\b(get|set)\s+)?(?:(\*)\s*)?(?=\s*(((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?:
1783 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1784 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1785 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1786 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1787 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1788 (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1789 (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1790 (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1791 )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(])
1793 1: storage.modifier.async.ts
1794 2: storage.type.property.ts
1795 3: keyword.generator.asterisk.ts
1799 - include: method-declaration-name
1802 - include: object-literal-method-declaration
1805 - meta_scope: meta.object.member.ts meta.object-literal.key.ts
1806 - match: '(?=:)|((?<=[\]])(?=\s*[\(\<]))'
1809 - include: array-literal
1810 - match: '(?=[\''\"\`])'
1812 - meta_scope: meta.object.member.ts meta.object-literal.key.ts
1813 - match: '(?=:)|((?<=[\''\"\`])(?=((\s*[\(\<,}])|(\s+(as)\s+))))'
1818 (?x)(?=(\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?:
1819 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1820 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1821 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1822 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1823 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1824 (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1825 (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1826 (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1829 - meta_scope: meta.object.member.ts meta.object-literal.key.ts
1830 - match: '(?=:)|(?=\s*([\(\<,}])|(\s+as\s+))'
1833 - include: numeric-literal
1834 - match: '(?<=[\]\''\"\`])(?=\s*[\(\<])'
1836 - meta_scope: meta.method.declaration.ts
1837 - match: '(?=\}|;|,)|(?<=\})'
1839 - include: function-body
1840 - match: '(?![_$[:alpha:]])([[:digit:]]+)\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*:)'
1841 scope: meta.object.member.ts
1843 0: meta.object-literal.key.ts
1844 1: constant.numeric.decimal.ts
1846 (?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*:(\s*\/\*([^\*]|(\*[^\/]))*\*\/)*\s*(
1848 (function\s*[(<*]) |
1850 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1853 ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
1854 # sure shot arrow functions even if => is on new line
1856 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
1857 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
1860 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
1864 # arrow function possible to detect only with => on same line
1866 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
1867 \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
1868 (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
1869 \s*=> # arrow operator
1873 scope: meta.object.member.ts
1875 0: meta.object-literal.key.ts
1876 1: entity.name.function.ts
1877 - match: '(?:[_$[:alpha:]][_$[:alnum:]]*)\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*:)'
1878 scope: meta.object.member.ts
1880 0: meta.object-literal.key.ts
1883 0: keyword.operator.spread.ts
1885 - meta_scope: meta.object.member.ts
1888 - include: expression
1889 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?=,|\}|$|\/\/|\/\*)'
1890 scope: meta.object.member.ts
1892 1: variable.other.readwrite.ts
1893 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+(const)(?=\s*([,}]|$))'
1894 scope: meta.object.member.ts
1896 1: keyword.control.as.ts
1897 2: storage.modifier.ts
1898 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+'
1900 1: keyword.control.as.ts
1902 - meta_scope: meta.object.member.ts
1903 - match: '(?=$|^|[,}]|\|\||\&\&|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+))'
1906 - match: '(?=[_$[:alpha:]][_$[:alnum:]]*\s*=)'
1908 - meta_scope: meta.object.member.ts
1909 - match: '(?=,|\}|$|\/\/|\/\*)'
1911 - include: expression
1914 0: meta.object-literal.key.ts punctuation.separator.key-value.ts
1916 - meta_scope: meta.object.member.ts
1919 - match: '(?<=:)\s*(async)?(?=\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)\(\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))'
1921 1: storage.modifier.async.ts
1925 - include: type-parameters
1928 0: meta.brace.round.ts
1932 0: meta.brace.round.ts
1934 - include: expression-inside-possibly-arrow-parens
1935 - match: '(?<=:)\s*(async)?\s*(\()(?=\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))'
1937 1: storage.modifier.async.ts
1938 2: meta.brace.round.ts
1942 0: meta.brace.round.ts
1944 - include: expression-inside-possibly-arrow-parens
1945 - match: (?<=:)\s*(async)?\s*(?=\<\s*$)
1947 1: storage.modifier.async.ts
1951 - include: type-parameters
1952 - match: '(?<=\>)\s*(\()(?=\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))'
1954 1: meta.brace.round.ts
1958 0: meta.brace.round.ts
1960 - include: expression-inside-possibly-arrow-parens
1961 - include: possibly-arrow-return-type
1962 - include: expression
1963 - include: punctuation-comma
1964 parameter-array-binding-pattern:
1965 - match: '(?:(\.\.\.)\s*)?(\[)'
1967 1: keyword.operator.rest.ts
1968 2: punctuation.definition.binding-pattern.array.ts
1972 0: punctuation.definition.binding-pattern.array.ts
1974 - include: parameter-binding-element
1975 - include: punctuation-comma
1976 parameter-binding-element:
1979 - include: numeric-literal
1981 - include: parameter-object-binding-pattern
1982 - include: parameter-array-binding-pattern
1983 - include: destructuring-parameter-rest
1984 - include: variable-initializer
1986 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|protected|private|readonly)\s+(?=(public|protected|private|readonly)\s+)'
1988 1: storage.modifier.ts
1990 (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*
1991 # function assignment |
1994 (function\s*[(<*]) |
1996 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1999 ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
2000 # sure shot arrow functions even if => is on new line
2002 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
2003 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
2006 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
2010 # arrow function possible to detect only with => on same line
2012 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
2013 \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
2014 (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
2015 \s*=> # arrow operator
2019 # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>
2031 (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
2032 (:\s*((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
2033 (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
2035 (function\s*[(<*]) |
2037 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
2040 ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
2041 # sure shot arrow functions even if => is on new line
2043 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
2044 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
2047 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
2051 # arrow function possible to detect only with => on same line
2053 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
2054 \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
2055 (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
2056 \s*=> # arrow operator
2061 1: storage.modifier.ts
2062 2: keyword.operator.rest.ts
2063 3: entity.name.function.ts variable.language.this.ts
2064 4: entity.name.function.ts
2065 5: keyword.operator.optional.ts
2066 - match: '(?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)'
2068 1: storage.modifier.ts
2069 2: keyword.operator.rest.ts
2070 3: variable.parameter.ts variable.language.this.ts
2071 4: variable.parameter.ts
2072 5: keyword.operator.optional.ts
2073 parameter-object-binding-element:
2076 (?x)(?=((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?:
2077 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
2078 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
2079 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
2080 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
2081 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
2082 (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
2083 (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
2084 (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
2085 )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
2089 - include: object-binding-element-propertyName
2090 - include: parameter-binding-element
2091 - include: parameter-object-binding-pattern
2092 - include: destructuring-parameter-rest
2093 - include: variable-initializer
2094 - include: punctuation-comma
2095 parameter-object-binding-pattern:
2096 - match: '(?:(\.\.\.)\s*)?(\{)'
2098 1: keyword.operator.rest.ts
2099 2: punctuation.definition.binding-pattern.object.ts
2103 0: punctuation.definition.binding-pattern.object.ts
2105 - include: parameter-object-binding-element
2106 parameter-type-annotation:
2109 1: keyword.operator.type.annotation.ts
2111 - meta_scope: meta.type.annotation.ts
2112 - match: "(?=[,)])|(?==[^>])"
2118 0: meta.brace.round.ts
2122 0: meta.brace.round.ts
2124 - include: expression
2125 paren-expression-possibly-arrow:
2126 - match: '(?<=[(=,])\s*(async)?(?=\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?\(\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))'
2128 1: storage.modifier.async.ts
2132 - include: paren-expression-possibly-arrow-with-typeparameters
2133 - match: '(?<=[(=,]|=>|^return|[^\._$[:alnum:]]return)\s*(async)?(?=\s*((((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?\()|(<))\s*$)'
2135 1: storage.modifier.async.ts
2139 - include: paren-expression-possibly-arrow-with-typeparameters
2140 - include: possibly-arrow-return-type
2141 paren-expression-possibly-arrow-with-typeparameters:
2142 - include: type-parameters
2145 0: meta.brace.round.ts
2149 0: meta.brace.round.ts
2151 - include: expression-inside-possibly-arrow-parens
2152 possibly-arrow-return-type:
2153 - match: '(?<=\)|^)\s*(:)(?=\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*=>)'
2155 1: meta.arrow.ts meta.return.type.arrow.ts keyword.operator.type.annotation.ts
2157 - meta_content_scope: meta.arrow.ts meta.return.type.arrow.ts
2158 - match: '(?==>|\{|(^\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\s+))'
2160 - include: arrow-return-type-body
2162 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(get|set)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2163 scope: storage.type.property.ts
2164 punctuation-accessor:
2165 - match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))'
2167 1: punctuation.accessor.ts
2168 2: punctuation.accessor.optional.ts
2171 scope: punctuation.separator.comma.ts
2172 punctuation-semicolon:
2174 scope: punctuation.terminator.statement.ts
2178 0: punctuation.definition.string.begin.ts
2180 - meta_scope: string.quoted.double.ts
2181 - match: '(")|((?:[^\\\n])$)'
2183 1: punctuation.definition.string.end.ts
2184 2: invalid.illegal.newline.ts
2186 - include: string-character-escape
2190 0: punctuation.definition.string.begin.ts
2192 - meta_scope: string.quoted.single.ts
2193 - match: '(\'')|((?:[^\\\n])$)'
2195 1: punctuation.definition.string.end.ts
2196 2: invalid.illegal.newline.ts
2198 - include: string-character-escape
2200 - match: '(?<!\+\+|--|})(?<=[=(:,\[?+!]|^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case|=>|&&|\|\||\*\/)\s*(\/)(?![\/*])(?=(?:[^\/\\\[\()]|\\.|\[([^\]\\]|\\.)+\]|\(([^\)\\]|\\.)+\))+\/([gimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))'
2202 1: punctuation.definition.string.begin.ts
2204 - meta_scope: string.regexp.ts
2205 - match: "(/)([gimsuy]*)"
2207 1: punctuation.definition.string.end.ts
2211 - match: '((?<![_$[:alnum:])\]]|\+\+|--|}|\*\/)|((?<=^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case))\s*)\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)+\])+\/([gimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))'
2213 0: punctuation.definition.string.begin.ts
2215 - meta_scope: string.regexp.ts
2216 - match: "(/)([gimsuy]*)"
2218 1: punctuation.definition.string.end.ts
2222 regex-character-class:
2223 - match: '\\[wWsSdDtrnvf]|\.'
2224 scope: constant.other.character-class.regexp
2225 - match: '\\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})'
2226 scope: constant.character.numeric.regexp
2228 scope: constant.character.control.regexp
2230 scope: constant.character.escape.backslash.regexp
2232 - match: '\\[bB]|\^|\$'
2233 scope: keyword.control.anchor.regexp
2234 - match: '\\[1-9]\d*|\\k<([a-zA-Z_$][\w$]*)>'
2236 0: keyword.other.back-reference.regexp
2237 1: variable.other.regexp
2238 - match: '[?+*]|\{(\d+,\d+|\d+,|,\d+|\d+)\}\??'
2239 scope: keyword.operator.quantifier.regexp
2241 scope: keyword.operator.or.regexp
2242 - match: (\()((\?=)|(\?!)|(\?<=)|(\?<!))
2244 1: punctuation.definition.group.regexp
2245 2: punctuation.definition.group.assertion.regexp
2246 3: meta.assertion.look-ahead.regexp
2247 4: meta.assertion.negative-look-ahead.regexp
2248 5: meta.assertion.look-behind.regexp
2249 6: meta.assertion.negative-look-behind.regexp
2251 - meta_scope: meta.group.assertion.regexp
2254 1: punctuation.definition.group.regexp
2257 - match: '\((?:(\?:)|(?:\?<([a-zA-Z_$][\w$]*)>))?'
2259 0: punctuation.definition.group.regexp
2260 1: punctuation.definition.group.no-capture.regexp
2261 2: variable.other.regexp
2263 - meta_scope: meta.group.regexp
2266 0: punctuation.definition.group.regexp
2269 - match: '(\[)(\^)?'
2271 1: punctuation.definition.character-class.regexp
2272 2: keyword.operator.negation.regexp
2274 - meta_scope: constant.other.character-class.set.regexp
2277 1: punctuation.definition.character-class.regexp
2279 - match: '(?:.|(\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\c[A-Z])|(\\.))\-(?:[^\]\\]|(\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\c[A-Z])|(\\.))'
2280 scope: constant.other.character-class.range.regexp
2282 1: constant.character.numeric.regexp
2283 2: constant.character.control.regexp
2284 3: constant.character.escape.backslash.regexp
2285 4: constant.character.numeric.regexp
2286 5: constant.character.control.regexp
2287 6: constant.character.escape.backslash.regexp
2288 - include: regex-character-class
2289 - include: regex-character-class
2291 - match: (?<=\))\s*(:)(?=\s*\S)
2293 1: keyword.operator.type.annotation.ts
2295 - meta_scope: meta.return.type.ts
2296 - match: "(?<![:|&])(?=$|^|[{};,]|//)"
2298 - include: return-type-core
2299 - match: (?<=\))\s*(:)
2301 1: keyword.operator.type.annotation.ts
2303 - meta_scope: meta.return.type.ts
2304 - match: '(?<![:|&])((?=[{};,]|//|^\s*$)|((?<=\S)(?=\s*$)))'
2306 - include: return-type-core
2309 - match: '(?<=[:|&])(?=\s*\{)'
2313 - include: type-object
2314 - include: type-predicate-operator
2316 single-line-comment-consuming-line-ending:
2317 - match: '(^[ \t]+)?((//)(?:\s*((@)internal)(?=\s|$))?)'
2319 1: punctuation.whitespace.comment.leading.ts
2320 2: comment.line.double-slash.ts
2321 3: punctuation.definition.comment.ts
2322 4: storage.type.internaldeclaration.ts
2323 5: punctuation.decorator.internaldeclaration.ts
2325 - meta_content_scope: comment.line.double-slash.ts
2329 - include: declaration
2330 - include: control-statement
2331 - include: after-operator-block-as-object-literal
2332 - include: decl-block
2334 - include: expression
2335 - include: punctuation-semicolon
2339 - include: qstring-single
2340 - include: qstring-double
2342 string-character-escape:
2343 - match: '\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|u\{[0-9A-Fa-f]+\}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)'
2344 scope: constant.character.escape.ts
2346 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))super\b(?!\$)'
2347 scope: variable.language.super.ts
2348 support-function-call-identifiers:
2350 - include: support-objects
2351 - include: object-identifiers
2352 - include: punctuation-accessor
2353 - match: '(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))import(?=\s*[\(]\s*[\"\''\`]))'
2354 scope: keyword.operator.expression.import.ts
2356 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(arguments)\b(?!\$)'
2357 scope: variable.language.arguments.ts
2359 (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(Array|ArrayBuffer|Atomics|BigInt|BigInt64Array|BigUint64Array|Boolean|DataView|Date|Float32Array
2360 |Float64Array|Function|Generator|GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Proxy
2361 |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray
2362 |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\b(?!\$)
2363 scope: support.class.builtin.ts
2364 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))((Eval|Internal|Range|Reference|Syntax|Type|URI)?Error)\b(?!\$)'
2365 scope: support.class.error.ts
2366 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(Promise)\b(?!\$)'
2367 scope: support.class.promise.ts
2369 (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(clear(Interval|Timeout)|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval|
2370 isFinite|isNaN|parseFloat|parseInt|require|set(Interval|Timeout)|super|unescape|uneval)(?=\s*\()
2371 scope: support.function.ts
2373 (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(Math)(?:\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(?:
2374 (abs|acos|acosh|asin|asinh|atan|atan2|atanh|cbrt|ceil|clz32|cos|cosh|exp|
2375 expm1|floor|fround|hypot|imul|log|log10|log1p|log2|max|min|pow|random|
2376 round|sign|sin|sinh|sqrt|tan|tanh|trunc)
2378 (E|LN10|LN2|LOG10E|LOG2E|PI|SQRT1_2|SQRT2)))?\b(?!\$)
2380 1: support.constant.math.ts
2381 2: punctuation.accessor.ts
2382 3: punctuation.accessor.optional.ts
2383 4: support.function.math.ts
2384 5: support.constant.property.math.ts
2386 (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(console)(?:\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(
2387 assert|clear|count|debug|dir|error|group|groupCollapsed|groupEnd|info|log
2388 |profile|profileEnd|table|time|timeEnd|timeStamp|trace|warn))?\b(?!\$)
2390 1: support.class.console.ts
2391 2: punctuation.accessor.ts
2392 3: punctuation.accessor.optional.ts
2393 4: support.function.console.ts
2394 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(JSON)(?:\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(parse|stringify))?\b(?!\$)'
2396 1: support.constant.json.ts
2397 2: punctuation.accessor.ts
2398 3: punctuation.accessor.optional.ts
2399 4: support.function.json.ts
2400 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(import)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(meta)\b(?!\$)'
2402 1: keyword.control.import.ts
2403 2: punctuation.accessor.ts
2404 3: punctuation.accessor.optional.ts
2405 4: support.variable.property.importmeta.ts
2406 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(new)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(target)\b(?!\$)'
2408 1: keyword.operator.new.ts
2409 2: punctuation.accessor.ts
2410 3: punctuation.accessor.optional.ts
2411 4: support.variable.property.target.ts
2413 (?x) (?:(\.)|(\?\.(?!\s*[[:digit:]]))) \s* (?:
2414 (?:(constructor|length|prototype|__proto__)\b(?!\$|\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?\())
2416 (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\b(?!\$)))
2418 1: punctuation.accessor.ts
2419 2: punctuation.accessor.optional.ts
2420 3: support.variable.property.ts
2421 4: support.constant.ts
2423 (?x) (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.)) \b (?:
2424 (document|event|navigator|performance|screen|window)
2426 (AnalyserNode|ArrayBufferView|Attr|AudioBuffer|AudioBufferSourceNode|AudioContext|AudioDestinationNode|AudioListener
2427 |AudioNode|AudioParam|BatteryManager|BeforeUnloadEvent|BiquadFilterNode|Blob|BufferSource|ByteString|CSS|CSSConditionRule
2428 |CSSCounterStyleRule|CSSGroupingRule|CSSMatrix|CSSMediaRule|CSSPageRule|CSSPrimitiveValue|CSSRule|CSSRuleList|CSSStyleDeclaration
2429 |CSSStyleRule|CSSStyleSheet|CSSSupportsRule|CSSValue|CSSValueList|CanvasGradient|CanvasImageSource|CanvasPattern
2430 |CanvasRenderingContext2D|ChannelMergerNode|ChannelSplitterNode|CharacterData|ChromeWorker|CloseEvent|Comment|CompositionEvent
2431 |Console|ConvolverNode|Coordinates|Credential|CredentialsContainer|Crypto|CryptoKey|CustomEvent|DOMError|DOMException
2432 |DOMHighResTimeStamp|DOMImplementation|DOMString|DOMStringList|DOMStringMap|DOMTimeStamp|DOMTokenList|DataTransfer
2433 |DataTransferItem|DataTransferItemList|DedicatedWorkerGlobalScope|DelayNode|DeviceProximityEvent|DirectoryEntry
2434 |DirectoryEntrySync|DirectoryReader|DirectoryReaderSync|Document|DocumentFragment|DocumentTouch|DocumentType|DragEvent
2435 |DynamicsCompressorNode|Element|Entry|EntrySync|ErrorEvent|Event|EventListener|EventSource|EventTarget|FederatedCredential
2436 |FetchEvent|File|FileEntry|FileEntrySync|FileException|FileList|FileReader|FileReaderSync|FileSystem|FileSystemSync
2437 |FontFace|FormData|GainNode|Gamepad|GamepadButton|GamepadEvent|Geolocation|GlobalEventHandlers|HTMLAnchorElement
2438 |HTMLAreaElement|HTMLAudioElement|HTMLBRElement|HTMLBaseElement|HTMLBodyElement|HTMLButtonElement|HTMLCanvasElement
2439 |HTMLCollection|HTMLContentElement|HTMLDListElement|HTMLDataElement|HTMLDataListElement|HTMLDialogElement|HTMLDivElement
2440 |HTMLDocument|HTMLElement|HTMLEmbedElement|HTMLFieldSetElement|HTMLFontElement|HTMLFormControlsCollection|HTMLFormElement
2441 |HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLIFrameElement|HTMLImageElement|HTMLInputElement
2442 |HTMLKeygenElement|HTMLLIElement|HTMLLabelElement|HTMLLegendElement|HTMLLinkElement|HTMLMapElement|HTMLMediaElement
2443 |HTMLMetaElement|HTMLMeterElement|HTMLModElement|HTMLOListElement|HTMLObjectElement|HTMLOptGroupElement|HTMLOptionElement
2444 |HTMLOptionsCollection|HTMLOutputElement|HTMLParagraphElement|HTMLParamElement|HTMLPreElement|HTMLProgressElement
2445 |HTMLQuoteElement|HTMLScriptElement|HTMLSelectElement|HTMLShadowElement|HTMLSourceElement|HTMLSpanElement|HTMLStyleElement
2446 |HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableElement|HTMLTableHeaderCellElement
2447 |HTMLTableRowElement|HTMLTableSectionElement|HTMLTextAreaElement|HTMLTimeElement|HTMLTitleElement|HTMLTrackElement
2448 |HTMLUListElement|HTMLUnknownElement|HTMLVideoElement|HashChangeEvent|History|IDBCursor|IDBCursorWithValue|IDBDatabase
2449 |IDBEnvironment|IDBFactory|IDBIndex|IDBKeyRange|IDBMutableFile|IDBObjectStore|IDBOpenDBRequest|IDBRequest|IDBTransaction
2450 |IDBVersionChangeEvent|IIRFilterNode|IdentityManager|ImageBitmap|ImageBitmapFactories|ImageData|Index|InputDeviceCapabilities
2451 |InputEvent|InstallEvent|InstallTrigger|KeyboardEvent|LinkStyle|LocalFileSystem|LocalFileSystemSync|Location|MIDIAccess
2452 |MIDIConnectionEvent|MIDIInput|MIDIInputMap|MIDIOutputMap|MediaElementAudioSourceNode|MediaError|MediaKeyMessageEvent
2453 |MediaKeySession|MediaKeyStatusMap|MediaKeySystemAccess|MediaKeySystemConfiguration|MediaKeys|MediaRecorder|MediaStream
2454 |MediaStreamAudioDestinationNode|MediaStreamAudioSourceNode|MessageChannel|MessageEvent|MessagePort|MouseEvent
2455 |MutationObserver|MutationRecord|NamedNodeMap|Navigator|NavigatorConcurrentHardware|NavigatorGeolocation|NavigatorID
2456 |NavigatorLanguage|NavigatorOnLine|Node|NodeFilter|NodeIterator|NodeList|NonDocumentTypeChildNode|Notification
2457 |OfflineAudioCompletionEvent|OfflineAudioContext|OscillatorNode|PageTransitionEvent|PannerNode|ParentNode|PasswordCredential
2458 |Path2D|PaymentAddress|PaymentRequest|PaymentResponse|Performance|PerformanceEntry|PerformanceFrameTiming|PerformanceMark
2459 |PerformanceMeasure|PerformanceNavigation|PerformanceNavigationTiming|PerformanceObserver|PerformanceObserverEntryList
2460 |PerformanceResourceTiming|PerformanceTiming|PeriodicSyncEvent|PeriodicWave|Plugin|Point|PointerEvent|PopStateEvent
2461 |PortCollection|Position|PositionError|PositionOptions|PresentationConnectionClosedEvent|PresentationConnectionList
2462 |PresentationReceiver|ProcessingInstruction|ProgressEvent|PromiseRejectionEvent|PushEvent|PushRegistrationManager
2463 |RTCCertificate|RTCConfiguration|RTCPeerConnection|RTCSessionDescriptionCallback|RTCStatsReport|RadioNodeList|RandomSource
2464 |Range|ReadableByteStream|RenderingContext|SVGAElement|SVGAngle|SVGAnimateColorElement|SVGAnimateElement|SVGAnimateMotionElement
2465 |SVGAnimateTransformElement|SVGAnimatedAngle|SVGAnimatedBoolean|SVGAnimatedEnumeration|SVGAnimatedInteger|SVGAnimatedLength
2466 |SVGAnimatedLengthList|SVGAnimatedNumber|SVGAnimatedNumberList|SVGAnimatedPoints|SVGAnimatedPreserveAspectRatio
2467 |SVGAnimatedRect|SVGAnimatedString|SVGAnimatedTransformList|SVGAnimationElement|SVGCircleElement|SVGClipPathElement
2468 |SVGCursorElement|SVGDefsElement|SVGDescElement|SVGElement|SVGEllipseElement|SVGEvent|SVGFilterElement|SVGFontElement
2469 |SVGFontFaceElement|SVGFontFaceFormatElement|SVGFontFaceNameElement|SVGFontFaceSrcElement|SVGFontFaceUriElement
2470 |SVGForeignObjectElement|SVGGElement|SVGGlyphElement|SVGGradientElement|SVGHKernElement|SVGImageElement|SVGLength
2471 |SVGLengthList|SVGLineElement|SVGLinearGradientElement|SVGMPathElement|SVGMaskElement|SVGMatrix|SVGMissingGlyphElement
2472 |SVGNumber|SVGNumberList|SVGPathElement|SVGPatternElement|SVGPoint|SVGPolygonElement|SVGPolylineElement|SVGPreserveAspectRatio
2473 |SVGRadialGradientElement|SVGRect|SVGRectElement|SVGSVGElement|SVGScriptElement|SVGSetElement|SVGStopElement|SVGStringList
2474 |SVGStylable|SVGStyleElement|SVGSwitchElement|SVGSymbolElement|SVGTRefElement|SVGTSpanElement|SVGTests|SVGTextElement
2475 |SVGTextPositioningElement|SVGTitleElement|SVGTransform|SVGTransformList|SVGTransformable|SVGUseElement|SVGVKernElement
2476 |SVGViewElement|ServiceWorker|ServiceWorkerContainer|ServiceWorkerGlobalScope|ServiceWorkerRegistration|ServiceWorkerState
2477 |ShadowRoot|SharedWorker|SharedWorkerGlobalScope|SourceBufferList|StereoPannerNode|Storage|StorageEvent|StyleSheet
2478 |StyleSheetList|SubtleCrypto|SyncEvent|Text|TextMetrics|TimeEvent|TimeRanges|Touch|TouchEvent|TouchList|Transferable
2479 |TreeWalker|UIEvent|USVString|VRDisplayCapabilities|ValidityState|WaveShaperNode|WebGL|WebGLActiveInfo|WebGLBuffer
2480 |WebGLContextEvent|WebGLFramebuffer|WebGLProgram|WebGLRenderbuffer|WebGLRenderingContext|WebGLShader|WebGLShaderPrecisionFormat
2481 |WebGLTexture|WebGLTimerQueryEXT|WebGLTransformFeedback|WebGLUniformLocation|WebGLVertexArrayObject|WebGLVertexArrayObjectOES
2482 |WebSocket|WebSockets|WebVTT|WheelEvent|Window|WindowBase64|WindowEventHandlers|WindowTimers|Worker|WorkerGlobalScope
2483 |WorkerLocation|WorkerNavigator|XMLHttpRequest|XMLHttpRequestEventTarget|XMLSerializer|XPathExpression|XPathResult
2484 |XSLTProcessor))\b(?!\$)
2486 1: support.variable.dom.ts
2487 2: support.class.dom.ts
2489 (?x) (?:(\.)|(\?\.(?!\s*[[:digit:]]))) \s* (?:
2490 (ATTRIBUTE_NODE|CDATA_SECTION_NODE|COMMENT_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE
2491 |DOMSTRING_SIZE_ERR|ELEMENT_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|HIERARCHY_REQUEST_ERR|INDEX_SIZE_ERR
2492 |INUSE_ATTRIBUTE_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR
2493 |NOT_SUPPORTED_ERR|NOTATION_NODE|PROCESSING_INSTRUCTION_NODE|TEXT_NODE|WRONG_DOCUMENT_ERR)
2495 (_content|[xyz]|abbr|above|accept|acceptCharset|accessKey|action|align|[av]Link(?:color)?|all|alt|anchors|appCodeName
2496 |appCore|applets|appMinorVersion|appName|appVersion|archive|areas|arguments|attributes|availHeight|availLeft|availTop
2497 |availWidth|axis|background|backgroundColor|backgroundImage|below|bgColor|body|border|borderBottomWidth|borderColor
2498 |borderLeftWidth|borderRightWidth|borderStyle|borderTopWidth|borderWidth|bottom|bufferDepth|callee|caller|caption
2499 |cellPadding|cells|cellSpacing|ch|characterSet|charset|checked|childNodes|chOff|cite|classes|className|clear
2500 |clientInformation|clip|clipBoardData|closed|code|codeBase|codeType|color|colorDepth|cols|colSpan|compact|complete
2501 |components|content|controllers|cookie|cookieEnabled|cords|cpuClass|crypto|current|data|dateTime|declare|defaultCharset
2502 |defaultChecked|defaultSelected|defaultStatus|defaultValue|defaultView|defer|description|dialogArguments|dialogHeight
2503 |dialogLeft|dialogTop|dialogWidth|dir|directories|disabled|display|docmain|doctype|documentElement|elements|embeds
2504 |enabledPlugin|encoding|enctype|entities|event|expando|external|face|fgColor|filename|firstChild|fontFamily|fontSize
2505 |fontWeight|form|formName|forms|frame|frameBorder|frameElement|frames|hasFocus|hash|headers|height|history|host
2506 |hostname|href|hreflang|hspace|htmlFor|httpEquiv|id|ids|ignoreCase|images|implementation|index|innerHeight|innerWidth
2507 |input|isMap|label|lang|language|lastChild|lastIndex|lastMatch|lastModified|lastParen|layer[sXY]|left|leftContext
2508 |lineHeight|link|linkColor|links|listStyleType|localName|location|locationbar|longDesc|lowsrc|lowSrc|marginBottom
2509 |marginHeight|marginLeft|marginRight|marginTop|marginWidth|maxLength|media|menubar|method|mimeTypes|multiline|multiple
2510 |name|nameProp|namespaces|namespaceURI|next|nextSibling|nodeName|nodeType|nodeValue|noHref|noResize|noShade|notationName
2511 |notations|noWrap|object|offscreenBuffering|onLine|onreadystatechange|opener|opsProfile|options|oscpu|outerHeight
2512 |outerWidth|ownerDocument|paddingBottom|paddingLeft|paddingRight|paddingTop|page[XY]|page[XY]Offset|parent|parentLayer
2513 |parentNode|parentWindow|pathname|personalbar|pixelDepth|pkcs11|platform|plugins|port|prefix|previous|previousDibling
2514 |product|productSub|profile|profileend|prompt|prompter|protocol|publicId|readOnly|readyState|referrer|rel|responseText
2515 |responseXML|rev|right|rightContext|rowIndex|rows|rowSpan|rules|scheme|scope|screen[XY]|screenLeft|screenTop|scripts
2516 |scrollbars|scrolling|sectionRowIndex|security|securityPolicy|selected|selectedIndex|selection|self|shape|siblingAbove
2517 |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary
2518 |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead
2519 |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile
2520 |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\b(?!\$|\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?\()
2522 1: punctuation.accessor.ts
2523 2: punctuation.accessor.optional.ts
2524 3: support.constant.dom.ts
2525 4: support.variable.property.dom.ts
2527 (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(Buffer|EventEmitter|Server|Pipe|Socket|REPLServer|ReadStream|WriteStream|Stream
2528 |Inflate|Deflate|InflateRaw|DeflateRaw|GZip|GUnzip|Unzip|Zip)\b(?!\$)
2529 scope: support.class.node.ts
2531 (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(process)(?:(?:(\.)|(\?\.(?!\s*[[:digit:]])))(?:
2532 (arch|argv|config|connected|env|execArgv|execPath|exitCode|mainModule|pid|platform|release|stderr|stdin|stdout|title|version|versions)
2534 (abort|chdir|cwd|disconnect|exit|[sg]ete?[gu]id|send|[sg]etgroups|initgroups|kill|memoryUsage|nextTick|umask|uptime|hrtime)
2537 1: support.variable.object.process.ts
2538 2: punctuation.accessor.ts
2539 3: punctuation.accessor.optional.ts
2540 4: support.variable.property.process.ts
2541 5: support.function.process.ts
2542 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(exports)|(module)(?:(?:(\.)|(\?\.(?!\s*[[:digit:]])))(exports|id|filename|loaded|parent|children))?)\b(?!\$)'
2544 1: support.type.object.module.ts
2545 2: support.type.object.module.ts
2546 3: punctuation.accessor.ts
2547 4: punctuation.accessor.optional.ts
2548 5: support.type.object.module.ts
2549 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(global|GLOBAL|root|__dirname|__filename)\b(?!\$)'
2550 scope: support.variable.object.node.ts
2552 (?x) (?:(\.)|(\?\.(?!\s*[[:digit:]]))) \s*
2554 (on(?:Rowsinserted|Rowsdelete|Rowenter|Rowexit|Resize|Resizestart|Resizeend|Reset|
2555 Readystatechange|Mouseout|Mouseover|Mousedown|Mouseup|Mousemove|
2556 Before(?:cut|deactivate|unload|update|paste|print|editfocus|activate)|
2557 Blur|Scrolltop|Submit|Select|Selectstart|Selectionchange|Hover|Help|
2558 Change|Contextmenu|Controlselect|Cut|Cellchange|Clock|Close|Deactivate|
2559 Datasetchanged|Datasetcomplete|Dataavailable|Drop|Drag|Dragstart|Dragover|
2560 Dragdrop|Dragenter|Dragend|Dragleave|Dblclick|Unload|Paste|Propertychange|Error|
2561 Errorupdate|Keydown|Keyup|Keypress|Focus|Load|Activate|Afterupdate|Afterprint|Abort)
2563 (shift|showModelessDialog|showModalDialog|showHelp|scroll|scrollX|scrollByPages|
2564 scrollByLines|scrollY|scrollTo|stop|strike|sizeToContent|sidebar|signText|sort|
2565 sup|sub|substr|substring|splice|split|send|set(?:Milliseconds|Seconds|Minutes|Hours|
2566 Month|Year|FullYear|Date|UTC(?:Milliseconds|Seconds|Minutes|Hours|Month|FullYear|Date)|
2567 Time|Hotkeys|Cursor|ZOptions|Active|Resizable|RequestHeader)|search|slice|
2568 savePreferences|small|home|handleEvent|navigate|char|charCodeAt|charAt|concat|
2569 contextual|confirm|compile|clear|captureEvents|call|createStyleSheet|createPopup|
2570 createEventObject|to(?:GMTString|UTCString|String|Source|UpperCase|LowerCase|LocaleString)|
2571 test|taint|taintEnabled|indexOf|italics|disableExternalCapture|dump|detachEvent|unshift|
2572 untaint|unwatch|updateCommands|join|javaEnabled|pop|push|plugins.refresh|paddings|parse|
2573 print|prompt|preference|enableExternalCapture|exec|execScript|valueOf|UTC|find|file|
2574 fileModifiedDate|fileSize|fileCreatedDate|fileUpdatedDate|fixed|fontsize|fontcolor|
2575 forward|fromCharCode|watch|link|load|lastIndexOf|anchor|attachEvent|atob|apply|alert|
2576 abort|routeEvents|resize|resizeBy|resizeTo|recalc|returnValue|replace|reverse|reload|
2577 releaseCapture|releaseEvents|go|get(?:Milliseconds|Seconds|Minutes|Hours|Month|Day|Year|FullYear|
2578 Time|Date|TimezoneOffset|UTC(?:Milliseconds|Seconds|Minutes|Hours|Day|Month|FullYear|Date)|
2579 Attention|Selection|ResponseHeader|AllResponseHeaders)|moveBy|moveBelow|moveTo|
2580 moveToAbsolute|moveAbove|mergeAttributes|match|margins|btoa|big|bold|borderWidths|blink|back
2582 (acceptNode|add|addEventListener|addTextTrack|adoptNode|after|animate|append|
2583 appendChild|appendData|before|blur|canPlayType|captureStream|
2584 caretPositionFromPoint|caretRangeFromPoint|checkValidity|clear|click|
2585 cloneContents|cloneNode|cloneRange|close|closest|collapse|
2586 compareBoundaryPoints|compareDocumentPosition|comparePoint|contains|
2587 convertPointFromNode|convertQuadFromNode|convertRectFromNode|createAttribute|
2588 createAttributeNS|createCaption|createCDATASection|createComment|
2589 createContextualFragment|createDocument|createDocumentFragment|
2590 createDocumentType|createElement|createElementNS|createEntityReference|
2591 createEvent|createExpression|createHTMLDocument|createNodeIterator|
2592 createNSResolver|createProcessingInstruction|createRange|createShadowRoot|
2593 createTBody|createTextNode|createTFoot|createTHead|createTreeWalker|delete|
2594 deleteCaption|deleteCell|deleteContents|deleteData|deleteRow|deleteTFoot|
2595 deleteTHead|detach|disconnect|dispatchEvent|elementFromPoint|elementsFromPoint|
2596 enableStyleSheetsForSet|entries|evaluate|execCommand|exitFullscreen|
2597 exitPointerLock|expand|extractContents|fastSeek|firstChild|focus|forEach|get|
2598 getAll|getAnimations|getAttribute|getAttributeNames|getAttributeNode|
2599 getAttributeNodeNS|getAttributeNS|getBoundingClientRect|getBoxQuads|
2600 getClientRects|getContext|getDestinationInsertionPoints|getElementById|
2601 getElementsByClassName|getElementsByName|getElementsByTagName|
2602 getElementsByTagNameNS|getItem|getNamedItem|getSelection|getStartDate|
2603 getVideoPlaybackQuality|has|hasAttribute|hasAttributeNS|hasAttributes|
2604 hasChildNodes|hasFeature|hasFocus|importNode|initEvent|insertAdjacentElement|
2605 insertAdjacentHTML|insertAdjacentText|insertBefore|insertCell|insertData|
2606 insertNode|insertRow|intersectsNode|isDefaultNamespace|isEqualNode|
2607 isPointInRange|isSameNode|item|key|keys|lastChild|load|lookupNamespaceURI|
2608 lookupPrefix|matches|move|moveAttribute|moveAttributeNode|moveChild|
2609 moveNamedItem|namedItem|nextNode|nextSibling|normalize|observe|open|
2610 parentNode|pause|play|postMessage|prepend|preventDefault|previousNode|
2611 previousSibling|probablySupportsContext|queryCommandEnabled|
2612 queryCommandIndeterm|queryCommandState|queryCommandSupported|queryCommandValue|
2613 querySelector|querySelectorAll|registerContentHandler|registerElement|
2614 registerProtocolHandler|releaseCapture|releaseEvents|remove|removeAttribute|
2615 removeAttributeNode|removeAttributeNS|removeChild|removeEventListener|
2616 removeItem|replace|replaceChild|replaceData|replaceWith|reportValidity|
2617 requestFullscreen|requestPointerLock|reset|scroll|scrollBy|scrollIntoView|
2618 scrollTo|seekToNextFrame|select|selectNode|selectNodeContents|set|setAttribute|
2619 setAttributeNode|setAttributeNodeNS|setAttributeNS|setCapture|
2620 setCustomValidity|setEnd|setEndAfter|setEndBefore|setItem|setNamedItem|
2621 setRangeText|setSelectionRange|setSinkId|setStart|setStartAfter|setStartBefore|
2622 slice|splitText|stepDown|stepUp|stopImmediatePropagation|stopPropagation|
2623 submit|substringData|supports|surroundContents|takeRecords|terminate|toBlob|
2624 toDataURL|toggle|toString|values|write|writeln
2626 (all|catch|finally|race|reject|resolve|then
2630 1: punctuation.accessor.ts
2631 2: punctuation.accessor.optional.ts
2632 3: support.function.event-handler.ts
2633 4: support.function.ts
2634 5: support.function.dom.ts
2635 6: support.function.promise.ts
2637 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?=\bswitch\s*\()'
2639 - meta_scope: switch-statement.expr.ts
2642 0: punctuation.definition.block.ts
2645 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(switch)\s*(\()'
2647 1: keyword.control.switch.ts
2648 2: meta.brace.round.ts
2650 - meta_scope: switch-expression.expr.ts
2653 0: meta.brace.round.ts
2655 - include: expression
2658 0: punctuation.definition.block.ts
2660 - meta_scope: switch-block.expr.ts
2663 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(case|default(?=:))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2665 1: keyword.control.switch.ts
2667 - meta_scope: case-clause.expr.ts
2670 - include: expression
2671 - match: '(:)\s*(\{)'
2673 1: case-clause.expr.ts punctuation.definition.section.case-statement.ts
2674 2: meta.block.ts punctuation.definition.block.ts
2676 - meta_content_scope: meta.block.ts
2679 0: meta.block.ts punctuation.definition.block.ts
2681 - include: statements
2684 0: case-clause.expr.ts punctuation.definition.section.case-statement.ts
2685 - include: statements
2687 - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)(<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?`)'
2689 - meta_scope: string.template.ts
2692 - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*))'
2694 - match: '(?=(<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?`)'
2696 - include: support-function-call-identifiers
2697 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
2698 scope: entity.name.function.tagged-template.ts
2699 - include: type-arguments
2700 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?=(<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)`)'
2702 1: entity.name.function.tagged-template.ts
2704 - meta_scope: string.template.ts
2707 - include: type-arguments
2708 - match: "([_$[:alpha:]][_$[:alnum:]]*)?(`)"
2710 1: entity.name.function.tagged-template.ts
2711 2: punctuation.definition.string.template.begin.ts
2713 - meta_scope: string.template.ts
2716 0: punctuation.definition.string.template.end.ts
2718 - include: template-substitution-element
2719 - include: string-character-escape
2720 template-substitution-element:
2723 0: punctuation.definition.template-expression.begin.ts
2725 - meta_scope: meta.template.expression.ts
2726 - meta_content_scope: meta.embedded.line.ts
2729 0: punctuation.definition.template-expression.end.ts
2731 - include: expression
2733 - match: '(?!\?\.\s*[^[:digit:]])(\?)(?!\?)'
2735 1: keyword.operator.ternary.ts
2739 1: keyword.operator.ternary.ts
2741 - include: expression
2743 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))this\b(?!\$)'
2744 scope: variable.language.this.ts
2748 - include: numeric-literal
2749 - include: type-primitive
2750 - include: type-builtin-literals
2751 - include: type-parameters
2752 - include: type-tuple
2753 - include: type-object
2754 - include: type-conditional
2755 - include: type-operators
2756 - include: type-fn-type-parameters
2757 - include: type-paren-or-function-parameters
2758 - include: type-function-return-type
2759 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(readonly)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*'
2761 1: storage.modifier.ts
2762 - include: type-name
2763 type-alias-declaration:
2764 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(type)\b\s+([_$[:alpha:]][_$[:alnum:]]*)\s*'
2766 1: keyword.control.export.ts
2767 2: storage.modifier.ts
2768 3: storage.type.type.ts
2769 4: entity.name.type.alias.ts
2771 - meta_scope: meta.type.declaration.ts
2772 - match: '(?=\}|;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
2775 - include: type-parameters
2778 1: keyword.operator.assignment.ts
2780 - match: '(?=\}|;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
2784 - match: (:)(?=\s*\S)
2786 1: keyword.operator.type.annotation.ts
2788 - meta_scope: meta.type.annotation.ts
2789 - match: '(?<![:|&])((?=$|^|[,);\}\]]|//)|(?==[^>])|((?<=[\}>\]\)]|[_$[:alpha:]])\s*(?=\{)))'
2794 1: keyword.operator.type.annotation.ts
2796 - meta_scope: meta.type.annotation.ts
2797 - match: '(?<![:|&])((?=[,);\}\]]|//)|(?==[^>])|(?=^\s*$)|((?<=\S)(?=\s*$))|((?<=[\}>\]\)]|[_$[:alpha:]])\s*(?=\{)))'
2803 0: punctuation.definition.typeparameters.begin.ts
2805 - meta_scope: meta.type.parameters.ts
2808 0: punctuation.definition.typeparameters.end.ts
2810 - include: type-arguments-body
2811 type-arguments-body:
2812 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(_)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2814 0: keyword.operator.type.ts
2816 - include: punctuation-comma
2817 type-builtin-literals:
2818 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(this|true|false|undefined|null|object)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2819 scope: support.type.builtin.ts
2821 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(extends)\s+'
2823 1: storage.modifier.ts
2829 0: keyword.operator.ternary.ts
2833 0: keyword.operator.ternary.ts
2837 type-fn-type-parameters:
2838 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(new)\b(?=\s*\<)'
2840 1: meta.type.constructor.ts keyword.control.new.ts
2845 - include: type-parameters
2846 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(new)\b\s*(?=\()'
2848 1: keyword.control.new.ts
2850 - meta_scope: meta.type.constructor.ts
2853 - include: function-parameters
2868 - meta_scope: meta.type.function.ts
2871 - include: function-parameters
2872 type-function-return-type:
2873 - match: (=>)(?=\s*\S)
2875 1: storage.type.function.arrow.ts
2877 - meta_scope: meta.type.function.return.ts
2878 - match: '(?<!=>)(?<![|&])(?=[,\]\)\{\}=;>:\?]|//|$)'
2880 - include: type-function-return-type-core
2883 0: storage.type.function.arrow.ts
2885 - meta_scope: meta.type.function.return.ts
2886 - match: '(?<!=>)(?<![|&])((?=[,\]\)\{\}=;:\?>]|//|^\s*$)|((?<=\S)(?=\s*$)))'
2888 - include: type-function-return-type-core
2889 type-function-return-type-core:
2891 - match: '(?<==>)(?=\s*\{)'
2895 - include: type-object
2896 - include: type-predicate-operator
2899 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(<)'
2901 1: entity.name.type.module.ts
2902 2: punctuation.accessor.ts
2903 3: punctuation.accessor.optional.ts
2904 4: meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts
2906 - meta_content_scope: meta.type.parameters.ts
2909 1: meta.type.parameters.ts punctuation.definition.typeparameters.end.ts
2911 - include: type-arguments-body
2912 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(<)'
2914 1: entity.name.type.ts
2915 2: meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts
2917 - meta_content_scope: meta.type.parameters.ts
2920 1: meta.type.parameters.ts punctuation.definition.typeparameters.end.ts
2922 - include: type-arguments-body
2923 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))'
2925 1: entity.name.type.module.ts
2926 2: punctuation.accessor.ts
2927 3: punctuation.accessor.optional.ts
2928 - match: "[_$[:alpha:]][_$[:alnum:]]*"
2929 scope: entity.name.type.ts
2933 0: punctuation.definition.block.ts
2935 - meta_scope: meta.object.type.ts
2938 0: punctuation.definition.block.ts
2941 - include: method-declaration
2942 - include: indexer-declaration
2943 - include: indexer-mapped-type-declaration
2944 - include: field-declaration
2945 - include: type-annotation
2948 0: keyword.operator.spread.ts
2950 - match: '(?=\}|;|,|$)|(?<=\})'
2953 - include: punctuation-comma
2954 - include: punctuation-semicolon
2957 - include: typeof-operator
2958 - match: '([&|])(?=\s*\{)'
2960 0: keyword.operator.type.ts
2964 - include: type-object
2967 0: keyword.operator.type.ts
2971 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))keyof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2972 scope: keyword.operator.expression.keyof.ts
2974 scope: keyword.operator.ternary.ts
2975 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))infer(?=\s+[_$[:alpha:]])'
2976 scope: keyword.operator.expression.infer.ts
2977 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))import(?=\s*\()'
2978 scope: keyword.operator.expression.import.ts
2982 1: punctuation.definition.typeparameters.begin.ts
2984 - meta_scope: meta.type.parameters.ts
2987 1: punctuation.definition.typeparameters.end.ts
2990 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(extends)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2991 scope: storage.modifier.ts
2993 - include: punctuation-comma
2995 scope: keyword.operator.assignment.ts
2996 type-paren-or-function-parameters:
2999 0: meta.brace.round.ts
3001 - meta_scope: meta.type.paren.cover.ts
3004 0: meta.brace.round.ts
3007 (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\s*(\??)(?=\s*(:\s*(
3018 (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
3019 (:\s*((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))))
3021 1: storage.modifier.ts
3022 2: keyword.operator.rest.ts
3023 3: entity.name.function.ts variable.language.this.ts
3024 4: entity.name.function.ts
3025 5: keyword.operator.optional.ts
3026 - match: '(?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\s*(\??)(?=:)'
3028 1: storage.modifier.ts
3029 2: keyword.operator.rest.ts
3030 3: variable.parameter.ts variable.language.this.ts
3031 4: variable.parameter.ts
3032 5: keyword.operator.optional.ts
3033 - include: type-annotation
3035 scope: punctuation.separator.parameter.ts
3037 type-predicate-operator:
3038 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(asserts)\s+)?(?!asserts)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\s(is)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3040 1: keyword.operator.type.asserts.ts
3041 2: variable.parameter.ts variable.language.this.ts
3042 3: variable.parameter.ts
3043 4: keyword.operator.expression.is.ts
3044 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(asserts)\s+(?!is)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3046 1: keyword.operator.type.asserts.ts
3047 2: variable.parameter.ts variable.language.this.ts
3048 3: variable.parameter.ts
3049 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))asserts(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3050 scope: keyword.operator.type.asserts.ts
3051 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))is(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3052 scope: keyword.operator.expression.is.ts
3054 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(string|number|bigint|boolean|symbol|any|void|never|unknown)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3055 scope: support.type.primitive.ts
3059 0: meta.brace.square.ts
3061 - meta_scope: meta.type.tuple.ts
3064 0: meta.brace.square.ts
3067 - include: punctuation-comma
3069 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))typeof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3070 scope: keyword.operator.expression.typeof.ts
3072 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))undefined(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3073 scope: constant.language.undefined.ts
3075 - match: '(?=(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))'
3077 - meta_scope: meta.var.expr.ts
3078 - match: '(?!(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))((?=;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|^\s*$|;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))|((?<!^let|[^\._$[:alnum:]]let|^var|[^\._$[:alnum:]]var)(?=\s*$)))'
3080 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*'
3082 1: keyword.control.export.ts
3083 2: storage.modifier.ts
3088 - include: destructuring-variable
3089 - include: var-single-variable
3090 - include: variable-initializer
3092 - match: (,)\s*((?!\S)|(?=\/\/))
3094 1: punctuation.separator.comma.ts
3096 - match: '(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))'
3098 - include: single-line-comment-consuming-line-ending
3100 - include: destructuring-variable
3101 - include: var-single-variable
3102 - include: punctuation-comma
3103 - include: punctuation-comma
3104 - match: '(?=(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))'
3106 1: keyword.control.export.ts
3107 2: storage.modifier.ts
3110 - meta_scope: meta.var.expr.ts
3111 - match: '(?!(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))((?=;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|^\s*$|;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))|((?<!^const|[^\._$[:alnum:]]const)(?=\s*$)))'
3113 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*'
3115 1: keyword.control.export.ts
3116 2: storage.modifier.ts
3121 - include: destructuring-const
3122 - include: var-single-const
3123 - include: variable-initializer
3125 - match: (,)\s*((?!\S)|(?=\/\/))
3127 1: punctuation.separator.comma.ts
3129 - match: '(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))'
3131 - include: single-line-comment-consuming-line-ending
3133 - include: destructuring-const
3134 - include: var-single-const
3135 - include: punctuation-comma
3136 - include: punctuation-comma
3139 (?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\s*
3140 # function assignment |
3143 (function\s*[(<*]) |
3145 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3148 ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
3149 # sure shot arrow functions even if => is on new line
3151 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
3152 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
3155 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
3159 # arrow function possible to detect only with => on same line
3161 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
3162 \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
3163 (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
3164 \s*=> # arrow operator
3168 # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>
3180 (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
3181 (:\s*((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
3182 (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
3184 (function\s*[(<*]) |
3186 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3189 ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
3190 # sure shot arrow functions even if => is on new line
3192 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
3193 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
3196 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
3200 # arrow function possible to detect only with => on same line
3202 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
3203 \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
3204 (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
3205 \s*=> # arrow operator
3210 1: meta.definition.variable.ts variable.other.constant.ts entity.name.function.ts
3212 - meta_scope: meta.var-single-variable.expr.ts
3213 - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
3215 - include: var-single-variable-type-annotation
3216 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
3218 1: meta.definition.variable.ts variable.other.constant.ts
3220 - meta_scope: meta.var-single-variable.expr.ts
3221 - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
3223 - include: var-single-variable-type-annotation
3224 var-single-variable:
3226 (?x)([_$[:alpha:]][_$[:alnum:]]*)(\!)?(?=\s*
3227 # function assignment |
3230 (function\s*[(<*]) |
3232 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3235 ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
3236 # sure shot arrow functions even if => is on new line
3238 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
3239 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
3242 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
3246 # arrow function possible to detect only with => on same line
3248 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
3249 \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
3250 (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
3251 \s*=> # arrow operator
3255 # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>
3267 (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
3268 (:\s*((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
3269 (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
3271 (function\s*[(<*]) |
3273 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3276 ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
3277 # sure shot arrow functions even if => is on new line
3279 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
3280 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
3283 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
3287 # arrow function possible to detect only with => on same line
3289 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
3290 \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
3291 (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
3292 \s*=> # arrow operator
3297 1: meta.definition.variable.ts entity.name.function.ts
3298 2: keyword.operator.definiteassignment.ts
3300 - meta_scope: meta.var-single-variable.expr.ts
3301 - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
3303 - include: var-single-variable-type-annotation
3304 - match: '([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])(\!)?'
3306 1: meta.definition.variable.ts variable.other.constant.ts
3307 2: keyword.operator.definiteassignment.ts
3309 - meta_scope: meta.var-single-variable.expr.ts
3310 - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
3312 - include: var-single-variable-type-annotation
3313 - match: '([_$[:alpha:]][_$[:alnum:]]*)(\!)?'
3315 1: meta.definition.variable.ts variable.other.readwrite.ts
3316 2: keyword.operator.definiteassignment.ts
3318 - meta_scope: meta.var-single-variable.expr.ts
3319 - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
3321 - include: var-single-variable-type-annotation
3322 var-single-variable-type-annotation:
3323 - include: type-annotation
3326 variable-initializer:
3327 - match: (?<!=|!)(=)(?!=)(?=\s*\S)(?!\s*.*=>\s*$)
3329 1: keyword.operator.assignment.ts
3331 - match: '(?=$|^|[,);}\]]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
3333 - include: expression
3334 - match: (?<!=|!)(=)(?!=)
3336 1: keyword.operator.assignment.ts
3338 - match: '(?=[,);}\]]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))|(?=^\s*$)|(?<=\S)(?<!=)(?=\s*$)'
3340 - include: expression
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list