@@ -9,10 +9,7 @@ contexts:
10 - include: directives
10 - include: directives
11 - include: statements
11 - include: statements
12− - match: \A(#!).*(?=$)
12+ - include: shebang
13− scope: comment.line.shebang.ts
15− 1: punctuation.definition.comment.ts
17 - match: /\*\*(?!/)
14 - match: /\*\*(?!/)
@@ -44,10 +41,10 @@ contexts:
44 5: punctuation.decorator.internaldeclaration.tsx
41 5: punctuation.decorator.internaldeclaration.tsx
46 - meta_content_scope: comment.line.double-slash.tsx
43 - meta_content_scope: comment.line.double-slash.tsx
47− - match: (?=^)
44+ - match: (?=$)
49 access-modifier:
46 access-modifier:
50− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(abstract|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
47+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(abstract|declare|override|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
51 scope: storage.modifier.tsx
48 scope: storage.modifier.tsx
52 after-operator-block-as-object-literal:
49 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*(\{)'
50 - match: '(?<!\+\+|--)(?<=[:=(,\[?+!>]|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^yield|[^\._$[:alnum:]]yield|^throw|[^\._$[:alnum:]]throw|^in|[^\._$[:alnum:]]in|^of|[^\._$[:alnum:]]of|^typeof|[^\._$[:alnum:]]typeof|&&|\|\||\*)\s*(\{)'
@@ -109,8 +106,8 @@ contexts:
110 # sure shot arrow functions even if => is on new line
107 # sure shot arrow functions even if => is on new line
112− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
109+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
113− [(]\s*
110+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
115 ([)]\s*:) | # ():
112 ([)]\s*:) | # ():
116 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
113 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -121,9 +118,9 @@ contexts:
122 # arrow function possible to detect only with => on same line
119 # arrow function possible to detect only with => on same line
124− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
121+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
125− \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
122+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
126− (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
123+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
127 \s*=> # arrow operator
124 \s*=> # arrow operator
@@ -138,13 +135,15 @@ contexts:
138 - include: type-parameters
135 - include: type-parameters
139 - include: function-parameters
136 - include: function-parameters
140 - include: arrow-return-type
137 - include: arrow-return-type
138+ - include: possibly-arrow-return-type
141 - match: "=>"
139 - match: "=>"
142 captures:
140 captures:
143 0: storage.type.function.arrow.tsx
141 0: storage.type.function.arrow.tsx
145 - meta_scope: meta.arrow.tsx
143 - meta_scope: meta.arrow.tsx
146− - match: '(?<=\}|\S)(?<!=>)|((?!\{)(?=\S))'
144+ - match: '((?<=\}|\S)(?<!=>)|((?!\{)(?=\S)))(?!\/[\/\*])'
147 pop: true
145 pop: true
146+ - include: single-line-comment-consuming-line-ending
148 - include: decl-block
147 - include: decl-block
149 - include: expression
148 - include: expression
150 arrow-return-type:
149 arrow-return-type:
@@ -170,6 +169,8 @@ contexts:
170 binding-element:
169 binding-element:
171 - include: comment
170 - include: comment
172 - include: string
171 - include: string
172+ - include: numeric-literal
173 - include: object-binding-pattern
174 - include: object-binding-pattern
174 - include: array-binding-pattern
175 - include: array-binding-pattern
175 - include: destructuring-variable-rest
176 - include: destructuring-variable-rest
@@ -177,6 +178,8 @@ contexts:
177 binding-element-const:
178 binding-element-const:
178 - include: comment
179 - include: comment
179 - include: string
180 - include: string
181+ - include: numeric-literal
180 - include: object-binding-pattern-const
183 - include: object-binding-pattern-const
181 - include: array-binding-pattern-const
184 - include: array-binding-pattern-const
182 - include: destructuring-variable-rest-const
185 - include: destructuring-variable-rest-const
@@ -200,11 +203,12 @@ contexts:
201 - include: jsx
204 - include: jsx
202 class-declaration:
205 class-declaration:
203− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(export)\s+)?\b(?:(abstract)\s+)?\b(class)\b(?=\s+|/[/*])'
206+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(?:(abstract)\s+)?\b(class)\b(?=\s+|/[/*])'
204 captures:
207 captures:
205 1: keyword.control.export.tsx
208 1: keyword.control.export.tsx
206 2: storage.modifier.tsx
209 2: storage.modifier.tsx
207− 3: storage.type.class.tsx
210+ 3: storage.modifier.tsx
211+ 4: storage.type.class.tsx
209 - meta_scope: meta.class.tsx
213 - meta_scope: meta.class.tsx
210 - match: '(?<=\})'
214 - match: '(?<=\})'
@@ -219,9 +223,10 @@ contexts:
219 - include: type-parameters
223 - include: type-parameters
220 - include: class-or-interface-body
224 - include: class-or-interface-body
221 class-expression:
225 class-expression:
222− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(class)\b(?=\s+|[<{]|\/[\/*])'
226+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(abstract)\s+)?(class)\b(?=\s+|[<{]|\/[\/*])'
223 captures:
227 captures:
224− 1: storage.type.class.tsx
228+ 1: storage.modifier.tsx
229+ 2: storage.type.class.tsx
226 - meta_scope: meta.class.tsx
231 - meta_scope: meta.class.tsx
227 - match: '(?<=\})'
232 - match: '(?<=\})'
@@ -238,6 +243,11 @@ contexts:
238 pop: true
243 pop: true
239 - include: comment
244 - include: comment
240 - include: decorator
245 - include: decorator
248+ - match: '(?=\s|[;),}\]:\-\+]|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
250+ - include: expression
241 - include: method-declaration
251 - include: method-declaration
242 - include: indexer-declaration
252 - include: indexer-declaration
243 - include: field-declaration
253 - include: field-declaration
@@ -284,9 +294,15 @@ contexts:
284 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(break|continue|do|goto|while)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
294 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(break|continue|do|goto|while)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
285 scope: keyword.control.loop.tsx
295 scope: keyword.control.loop.tsx
286 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(return)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
296 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(return)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
287− scope: keyword.control.flow.tsx
297+ captures:
298+ 0: keyword.control.flow.tsx
300+ - match: '(?=[;}]|$|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
302+ - include: expression
288 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(case|default|switch)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
303 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(case|default|switch)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
289 scope: keyword.control.switch.tsx
304 scope: keyword.control.switch.tsx
305+ - include: if-statement
290 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(else|if)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
306 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(else|if)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
291 scope: keyword.control.conditional.tsx
307 scope: keyword.control.conditional.tsx
292 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(with)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
308 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(with)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
@@ -295,8 +311,6 @@ contexts:
295 scope: keyword.control.tsx
311 scope: keyword.control.tsx
296 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(debugger)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
312 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(debugger)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
297 scope: keyword.other.debugger.tsx
313 scope: keyword.other.debugger.tsx
298− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(declare)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
299− scope: storage.modifier.tsx
300 decl-block:
314 decl-block:
301 - match: '\{'
315 - match: '\{'
302 captures:
316 captures:
@@ -320,6 +334,8 @@ contexts:
320 - include: import-equals-declaration
334 - include: import-equals-declaration
321 - include: import-declaration
335 - include: import-declaration
322 - include: export-declaration
336 - include: export-declaration
337+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(declare|export)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
338+ scope: storage.modifier.tsx
323 decorator:
339 decorator:
324 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))\@'
340 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))\@'
325 captures:
341 captures:
@@ -333,7 +349,7 @@ contexts:
333 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\{)'
349 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\{)'
335 - meta_scope: meta.object-binding-pattern-variable.tsx
351 - meta_scope: meta.object-binding-pattern-variable.tsx
336− - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
352+ - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
337 pop: true
353 pop: true
338 - include: object-binding-pattern-const
354 - include: object-binding-pattern-const
339 - include: type-annotation
355 - include: type-annotation
@@ -341,15 +357,16 @@ contexts:
341 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\[)'
357 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\[)'
343 - meta_scope: meta.array-binding-pattern-variable.tsx
359 - meta_scope: meta.array-binding-pattern-variable.tsx
344− - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
360+ - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
345 pop: true
361 pop: true
346 - include: array-binding-pattern-const
362 - include: array-binding-pattern-const
347 - include: type-annotation
363 - include: type-annotation
348 - include: comment
364 - include: comment
349 destructuring-parameter:
365 destructuring-parameter:
350− - match: '(?<!=|:)\s*(\{)'
366+ - match: '(?<!=|:)\s*(?:(\.\.\.)\s*)?(\{)'
351 captures:
367 captures:
352− 1: punctuation.definition.binding-pattern.object.tsx
368+ 1: keyword.operator.rest.tsx
369+ 2: punctuation.definition.binding-pattern.object.tsx
354 - meta_scope: meta.parameter.object-binding-pattern.tsx
371 - meta_scope: meta.parameter.object-binding-pattern.tsx
355 - match: '\}'
372 - match: '\}'
@@ -357,9 +374,10 @@ contexts:
357 0: punctuation.definition.binding-pattern.object.tsx
374 0: punctuation.definition.binding-pattern.object.tsx
358 pop: true
375 pop: true
359 - include: parameter-object-binding-element
376 - include: parameter-object-binding-element
360− - match: '(?<!=|:)\s*(\[)'
377+ - match: '(?<!=|:)\s*(?:(\.\.\.)\s*)?(\[)'
361 captures:
378 captures:
362− 1: punctuation.definition.binding-pattern.array.tsx
379+ 1: keyword.operator.rest.tsx
380+ 2: punctuation.definition.binding-pattern.array.tsx
364 - meta_scope: meta.paramter.array-binding-pattern.tsx
382 - meta_scope: meta.paramter.array-binding-pattern.tsx
365 - match: '\]'
383 - match: '\]'
@@ -377,7 +395,7 @@ contexts:
377 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\{)'
395 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\{)'
379 - meta_scope: meta.object-binding-pattern-variable.tsx
397 - meta_scope: meta.object-binding-pattern-variable.tsx
380− - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
398+ - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
381 pop: true
399 pop: true
382 - include: object-binding-pattern
400 - include: object-binding-pattern
383 - include: type-annotation
401 - include: type-annotation
@@ -385,7 +403,7 @@ contexts:
385 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\[)'
403 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\[)'
387 - meta_scope: meta.array-binding-pattern-variable.tsx
405 - meta_scope: meta.array-binding-pattern-variable.tsx
388− - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
406+ - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
389 pop: true
407 pop: true
390 - include: array-binding-pattern
408 - include: array-binding-pattern
391 - include: type-annotation
409 - include: type-annotation
@@ -401,12 +419,12 @@ contexts:
401 1: keyword.operator.rest.tsx
419 1: keyword.operator.rest.tsx
402 2: meta.definition.variable.tsx variable.other.constant.tsx
420 2: meta.definition.variable.tsx variable.other.constant.tsx
403 directives:
421 directives:
404− - match: '^(///)\s*(?=<(reference|amd-dependency|amd-module)(\s+(path|types|no-default-lib|lib|name)\s*=\s*((\''([^\''\\]|\\\''|\\)*\'')|(\"([^\"\\]|\\\"|\\)*\")))+\s*/>\s*$)'
422+ - match: '^(///)\s*(?=<(reference|amd-dependency|amd-module)(\s+(path|types|no-default-lib|lib|name)\s*=\s*((\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)))+\s*/>\s*$)'
405 captures:
423 captures:
406 1: punctuation.definition.comment.tsx
424 1: punctuation.definition.comment.tsx
408 - meta_scope: comment.line.triple-slash.directive.tsx
426 - meta_scope: comment.line.triple-slash.directive.tsx
409− - match: (?=^)
427+ - match: (?=$)
410 pop: true
428 pop: true
411 - match: (<)(reference|amd-dependency|amd-module)
429 - match: (<)(reference|amd-dependency|amd-module)
412 captures:
430 captures:
@@ -668,13 +686,18 @@ contexts:
668 captures:
686 captures:
669 1: punctuation.definition.block.tag.jsdoc
687 1: punctuation.definition.block.tag.jsdoc
670 - include: inline-tags
688 - include: inline-tags
689+ - match: '((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\s+)'
691+ 1: storage.type.class.jsdoc
692+ 2: punctuation.definition.block.tag.jsdoc
671 enum-declaration:
693 enum-declaration:
672− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:\b(const)\s+)?\b(enum)\s+([_$[:alpha:]][_$[:alnum:]]*)'
694+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?(?:\b(const)\s+)?\b(enum)\s+([_$[:alpha:]][_$[:alnum:]]*)'
673 captures:
695 captures:
674 1: keyword.control.export.tsx
696 1: keyword.control.export.tsx
675 2: storage.modifier.tsx
697 2: storage.modifier.tsx
676− 3: storage.type.enum.tsx
698+ 3: storage.modifier.tsx
677− 4: entity.name.type.enum.tsx
699+ 4: storage.type.enum.tsx
700+ 5: entity.name.type.enum.tsx
679 - meta_scope: meta.enum.declaration.tsx
702 - meta_scope: meta.enum.declaration.tsx
680 - match: '(?<=\})'
703 - match: '(?<=\})'
@@ -697,7 +720,7 @@ contexts:
697 pop: true
720 pop: true
698 - include: comment
721 - include: comment
699 - include: variable-initializer
722 - include: variable-initializer
700− - match: '(?=((\''([^\''\\]|\\\''|\\)*\'')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\])))'
723+ - match: '(?=((\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\])))'
702 - match: '(?=,|\}|$)'
725 - match: '(?=,|\}|$)'
703 pop: true
726 pop: true
@@ -713,22 +736,25 @@ contexts:
713 2: keyword.control.as.tsx
736 2: keyword.control.as.tsx
714 3: storage.type.namespace.tsx
737 3: storage.type.namespace.tsx
715 4: entity.name.type.module.tsx
738 4: entity.name.type.module.tsx
716− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)(?:(?:\s*(=))|(?:\s+(default)(?=\s+)))'
739+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)(?:\s+(type))?(?:(?:\s*(=))|(?:\s+(default)(?=\s+)))'
717 captures:
740 captures:
718 1: keyword.control.export.tsx
741 1: keyword.control.export.tsx
719− 2: keyword.operator.assignment.tsx
742+ 2: keyword.control.type.tsx
720− 3: keyword.control.default.tsx
743+ 3: keyword.operator.assignment.tsx
744+ 4: keyword.control.default.tsx
722 - meta_scope: meta.export.default.tsx
746 - meta_scope: meta.export.default.tsx
723− - match: (?=$|;|^\s*abstract\b|^\s*async\b|^\s*class\b|^\s*const\b|^\s*declare\b|^\s*enum\b|^\s*export\b|^\s*function\b|^\s*import\b|^\s*interface\b|^\s*let\b|^\s*module\b|^\s*namespace\b|^\s*return\b|^\s*type\b|^\s*var\b)
747+ - match: (?=$|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))
724 pop: true
748 pop: true
749+ - include: interface-declaration
725 - include: expression
750 - include: expression
726− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)(?!\s*:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
751+ - 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)))'
727 captures:
752 captures:
728− 0: keyword.control.export.tsx
753+ 1: keyword.control.export.tsx
754+ 2: keyword.control.type.tsx
730 - meta_scope: meta.export.tsx
756 - meta_scope: meta.export.tsx
731− - match: (?=$|;|^\s*abstract\b|^\s*async\b|^\s*class\b|^\s*const\b|^\s*declare\b|^\s*enum\b|^\s*export\b|^\s*function\b|^\s*import\b|^\s*interface\b|^\s*let\b|^\s*module\b|^\s*namespace\b|^\s*return\b|^\s*type\b|^\s*var\b)
757+ - match: (?=$|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))
732 pop: true
758 pop: true
733 - include: import-export-declaration
759 - include: import-export-declaration
734 expression:
760 expression:
@@ -737,7 +763,105 @@ contexts:
737 - include: expressionPunctuations
763 - include: expressionPunctuations
738 expression-inside-possibly-arrow-parens:
764 expression-inside-possibly-arrow-parens:
739 - include: expressionWithoutIdentifiers
765 - include: expressionWithoutIdentifiers
740− - include: function-parameters-body
766+ - include: comment
768+ - include: decorator
769+ - include: destructuring-parameter
770+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|protected|private|readonly)\s+(?=(override|public|protected|private|readonly)\s+)'
772+ 1: storage.modifier.tsx
774+ (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*
775+ # function assignment |
778+ (function\s*[(<*]) |
780+ ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
783+ ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
784+ # sure shot arrow functions even if => is on new line
786+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
787+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
790+ ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
794+ [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
796+ # arrow function possible to detect only with => on same line
798+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
799+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
800+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
801+ \s*=> # arrow operator
805+ # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>
817+ (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
818+ (:\s*((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
819+ (:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
821+ (function\s*[(<*]) |
823+ ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
826+ ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
827+ # sure shot arrow functions even if => is on new line
829+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
830+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
833+ ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
837+ [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
839+ # arrow function possible to detect only with => on same line
841+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
842+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
843+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
844+ \s*=> # arrow operator
849+ 1: storage.modifier.tsx
850+ 2: keyword.operator.rest.tsx
851+ 3: entity.name.function.tsx variable.language.this.tsx
852+ 4: entity.name.function.tsx
853+ 5: keyword.operator.optional.tsx
854+ - match: '(?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*[:,]|$)'
856+ 1: storage.modifier.tsx
857+ 2: keyword.operator.rest.tsx
858+ 3: variable.parameter.tsx variable.language.this.tsx
859+ 4: variable.parameter.tsx
860+ 5: keyword.operator.optional.tsx
861+ - include: type-annotation
862+ - include: variable-initializer
864+ scope: punctuation.separator.parameter.tsx
741 - include: identifiers
865 - include: identifiers
742 - include: expressionPunctuations
866 - include: expressionPunctuations
743 expression-operators:
867 expression-operators:
@@ -769,11 +893,15 @@ contexts:
769 - include: typeof-operator
893 - include: typeof-operator
770 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))void(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
894 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))void(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
771 scope: keyword.operator.expression.void.tsx
895 scope: keyword.operator.expression.void.tsx
896+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+(const)(?=\s*($|[;,:})\]]))'
898+ 1: keyword.control.as.tsx
899+ 2: storage.modifier.tsx
772 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+'
900 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+'
773 captures:
901 captures:
774 1: keyword.control.as.tsx
902 1: keyword.control.as.tsx
776− - match: '(?=$|^|[;,:})\]]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+))'
904+ - match: '(?=^|[;),}\]:?\-\+\>]|\|\||\&\&|\!\=\=|$|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+)|(\s+\<))'
777 pop: true
905 pop: true
778 - include: type
906 - include: type
779 - match: \.\.\.
907 - match: \.\.\.
@@ -788,7 +916,12 @@ contexts:
788 scope: keyword.operator.comparison.tsx
916 scope: keyword.operator.comparison.tsx
789 - match: <=|>=|<>|<|>
917 - match: <=|>=|<>|<|>
790 scope: keyword.operator.relational.tsx
918 scope: keyword.operator.relational.tsx
791− - match: \!|&&|\|\|
919+ - match: '(?<=[_$[:alnum:]])(\!)\s*(?:(/=)|(?:(/)(?![/*])))'
921+ 1: keyword.operator.logical.tsx
922+ 2: keyword.operator.assignment.compound.tsx
923+ 3: keyword.operator.arithmetic.tsx
924+ - match: \!|&&|\|\||\?\?
792 scope: keyword.operator.logical.tsx
925 scope: keyword.operator.logical.tsx
793 - match: \&|~|\^|\|
926 - match: \&|~|\^|\|
794 scope: keyword.operator.bitwise.tsx
927 scope: keyword.operator.bitwise.tsx
@@ -800,9 +933,18 @@ contexts:
800 scope: keyword.operator.increment.tsx
933 scope: keyword.operator.increment.tsx
801 - match: '%|\*|/|-|\+'
934 - match: '%|\*|/|-|\+'
802 scope: keyword.operator.arithmetic.tsx
935 scope: keyword.operator.arithmetic.tsx
803− - match: '(?<=[_$[:alnum:])\]])\s*(/)(?![/*])'
936+ - match: '(?<=[_$[:alnum:])\]])\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)+(?:(/=)|(?:(/)(?![/*]))))'
938+ - match: '(?:(/=)|(?:(/)(?!\*([^\*]|(\*[^\/]))*\*\/)))'
940+ 1: keyword.operator.assignment.compound.tsx
941+ 2: keyword.operator.arithmetic.tsx
944+ - match: '(?<=[_$[:alnum:])\]])\s*(?:(/=)|(?:(/)(?![/*])))'
804 captures:
945 captures:
805− 1: keyword.operator.arithmetic.tsx
946+ 1: keyword.operator.assignment.compound.tsx
947+ 2: keyword.operator.arithmetic.tsx
806 expressionPunctuations:
948 expressionPunctuations:
807 - include: punctuation-comma
949 - include: punctuation-comma
808 - include: punctuation-accessor
950 - include: punctuation-accessor
@@ -810,7 +952,6 @@ contexts:
810 - include: jsx
952 - include: jsx
811 - include: string
953 - include: string
812 - include: regex
954 - include: regex
814 - include: comment
955 - include: comment
815 - include: function-expression
956 - include: function-expression
816 - include: class-expression
957 - include: class-expression
@@ -828,143 +969,123 @@ contexts:
828 - include: paren-expression
969 - include: paren-expression
829 field-declaration:
970 field-declaration:
830 - match: |-
971 - match: |-
831− (?x)(?<!\()(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(readonly)\s+)?(?=\s*((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
972+ (?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(?!\$))|((?<!\$)(?:
832− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
973+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
833− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
974+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
834− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
975+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
835− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
976+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
836− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
977+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
837− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
978+ (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
838− (?:\B(\.)[0-9][0-9_]*\b)| # .1
979+ (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
839− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
980+ (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
840− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\?\s*)?(=|:))
981+ )(?!\$))|(\#?[_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(?:(?:(\?)|(\!))\s*)?(=|:|;|,|\}|$))
841 captures:
982 captures:
842 1: storage.modifier.tsx
983 1: storage.modifier.tsx
844 - meta_scope: meta.field.declaration.tsx
985 - meta_scope: meta.field.declaration.tsx
845 - match: |-
986 - match: |-
846− (?x)(?=\}|;|,|$|(^(?!\s*((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
987+ (?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(?!\$))|((?<!\$)(?:
847− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
988+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
848− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
989+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
849− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
990+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
850− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
991+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
851− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
992+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
852− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
993+ (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
853− (?:\B(\.)[0-9][0-9_]*\b)| # .1
994+ (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
854− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
995+ (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
855− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\?\s*)?(=|:))))|(?<=\})
996+ )(?!\$))|(\#?[_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(?:(?:(\?)|(\!))\s*)?(=|:|;|,|$))))|(?<=\})
856 pop: true
997 pop: true
857 - include: variable-initializer
998 - include: variable-initializer
999+ - include: type-annotation
1001+ - include: array-literal
1002+ - include: numeric-literal
858 - match: |-
1004 - match: |-
859− (?x)(?=((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
1005+ (?x)(\#?[_$[:alpha:]][_$[:alnum:]]*)(?:(\?)|(\!))?(?=\s*\s*
860− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1006+ # function assignment |
861− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1007+ (=\s*(
862− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1008+ ((async\s+)?(
863− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1009+ (function\s*[(<*]) |
864− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1010+ (function\s+) |
865− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1011+ ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
866− (?:\B(\.)[0-9][0-9_]*\b)| # .1
1012+ )) |
867− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1013+ ((async\s*)?(
868− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\?\s*)?(=|:))
1014+ ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
869− push:
1015+ # sure shot arrow functions even if => is on new line
871− (?x)(?=[};,=]|$|(^(?!\s*((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
1017+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
872− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1018+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
873− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1019+ (
874− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1020+ ([)]\s*:) | # ():
875− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1021+ ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
876− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1022+ )
877− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1023+ ) |
878− (?:\B(\.)[0-9][0-9_]*\b)| # .1
1024+ (
879− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1025+ [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
880− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\?\s*)?(=|:))))|(?<=\})
1026+ ) |
881− pop: true
1027+ # arrow function possible to detect only with => on same line
882− - include: type-annotation
1028+ (
883− - include: string
1029+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
884− - include: array-literal
1030+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
885− - include: numeric-literal
1031+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
886− - include: comment
1032+ \s*=> # arrow operator
888− (?x)([_$[:alpha:]][_$[:alnum:]]*)(\?)?(?=(\?\s*)?\s*
1034+ ))
889− # function assignment |
1035+ )) |
890− (=\s*(
1036+ # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>
891− ((async\s+)?(
1037+ (:\s*(
892− (function\s*[(<*]) |
1038+ (<) |
893− (function\s+) |
1039+ ([(]\s*(
894− ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1040+ ([)]) |
895− )) |
1041+ (\.\.\.) |
896− ((async\s*)?(
1042+ ([_$[:alnum:]]+\s*(
897− ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
1043+ ([:,?=])|
898− # sure shot arrow functions even if => is on new line
1044+ ([)]\s*=>)
900− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
1046+ ))
902− (
1048+ (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
903− ([)]\s*:) | # ():
1049+ (:\s*((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
904− ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
1050+ (:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
905− )
1051+ ((async\s+)?(
906− ) |
1052+ (function\s*[(<*]) |
907− (
1053+ (function\s+) |
908− [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
1054+ ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
910− # arrow function possible to detect only with => on same line
1056+ ((async\s*)?(
911− (
1057+ ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
912− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
1058+ # sure shot arrow functions even if => is on new line
913− \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
1059+ (
914− (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
1060+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
915− \s*=> # arrow operator
1061+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
917− ))
1063+ ([)]\s*:) | # ():
918− )) |
1064+ ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
919− # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>
1065+ )
922− ([(]\s*(
1068+ [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
924− (\.\.\.) |
1070+ # arrow function possible to detect only with => on same line
925− ([_$[:alnum:]]+\s*(
1071+ (
926− ([:,?=])|
1072+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
927− ([)]\s*=>)
1073+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
928− ))
1074+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
929− ))
1075+ \s*=> # arrow operator
931− (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$))) |
1077+ ))
932− (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
1078+ )))
933− ((async\s+)?(
1079+ captures:
934− (function\s*[(<*]) |
1080+ 1: meta.definition.property.tsx entity.name.function.tsx
935− (function\s+) |
1081+ 2: keyword.operator.optional.tsx
936− ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1082+ 3: keyword.operator.definiteassignment.tsx
937− )) |
1083+ - match: '\#?[_$[:alpha:]][_$[:alnum:]]*'
938− ((async\s*)?(
1084+ scope: meta.definition.property.tsx variable.object.property.tsx
939− ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
1085+ - match: \?
940− # sure shot arrow functions even if => is on new line
1086+ scope: keyword.operator.optional.tsx
942− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
1088+ scope: keyword.operator.definiteassignment.tsx
946− ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
950− [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
952− # arrow function possible to detect only with => on same line
954− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
955− \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
956− (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
957− \s*=> # arrow operator
962− 1: meta.definition.property.tsx entity.name.function.tsx
963− 2: keyword.operator.optional.tsx
964− - match: "[_$[:alpha:]][_$[:alnum:]]*"
965− scope: meta.definition.property.tsx variable.object.property.tsx
967− scope: keyword.operator.optional.tsx
968 for-loop:
1089 for-loop:
969 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))for(?=((\s+|(\s*\/\*([^\*]|(\*[^\/]))*\*\/\s*))await)?\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)?(\())'
1090 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))for(?=((\s+|(\s*\/\*([^\*]|(\*[^\/]))*\*\/\s*))await)?\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)?(\())'
970 captures:
1091 captures:
@@ -991,43 +1112,59 @@ contexts:
991 - include: type-parameters
1112 - include: type-parameters
992 - include: function-parameters
1113 - include: function-parameters
993 - include: return-type
1114 - include: return-type
1115+ - include: type-function-return-type
994 - include: decl-block
1116 - include: decl-block
995 - match: \*
1117 - match: \*
996 scope: keyword.generator.asterisk.tsx
1118 scope: keyword.generator.asterisk.tsx
997 function-call:
1119 function-call:
998− - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\s*(\?\.\s*)?(<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?!=)\>)*(?!=)>\s*)?\()'
1120+ - 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*)?\())'
1000− - match: '(?<=\))(?!(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\s*(\?\.\s*)?(<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?!=)\>)*(?!=)>\s*)?\()'
1122+ - 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*)?\())'
1001 pop: true
1123 pop: true
1002− - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*))'
1124+ - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))'
1004 - meta_scope: meta.function-call.tsx
1126 - meta_scope: meta.function-call.tsx
1005− - match: '(?=\s*(\?\.\s*)?(<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?!=)\>)*(?!=)>\s*)?\()'
1127+ - 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*)?\())'
1006 pop: true
1128 pop: true
1007− - include: literal
1129+ - include: function-call-target
1008− - include: support-objects
1009− - include: object-identifiers
1010− - include: punctuation-accessor
1011− - match: '(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))import(?=\s*[\(]\s*[\"\''\`]))'
1012− scope: keyword.operator.expression.import.tsx
1013− - match: "([_$[:alpha:]][_$[:alnum:]]*)"
1014− scope: entity.name.function.tsx
1015 - include: comment
1130 - include: comment
1016− - match: \?\.
1131+ - include: function-call-optionals
1017− scope: meta.function-call.tsx punctuation.accessor.optional.tsx
1018 - include: type-arguments
1132 - include: type-arguments
1019 - include: paren-expression
1133 - include: paren-expression
1134+ - match: '(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\)]))(<\s*[\{\[\(]\s*$))'
1136+ - match: '(?<=\>)(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\)]))(<\s*[\{\[\(]\s*$))'
1138+ - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))'
1140+ - meta_scope: meta.function-call.tsx
1141+ - match: '(?=(<\s*[\{\[\(]\s*$))'
1143+ - include: function-call-target
1145+ - include: function-call-optionals
1146+ - include: type-arguments
1147+ function-call-optionals:
1149+ scope: meta.function-call.tsx punctuation.accessor.optional.tsx
1151+ scope: meta.function-call.tsx keyword.operator.definiteassignment.tsx
1152+ function-call-target:
1153+ - include: support-function-call-identifiers
1154+ - match: '(\#?[_$[:alpha:]][_$[:alnum:]]*)'
1155+ scope: entity.name.function.tsx
1020 function-declaration:
1156 function-declaration:
1021− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(export)\s+)?(?:(async)\s+)?(function\b)(?:\s*(\*))?(?:(?:\s+|(?<=\*))([_$[:alpha:]][_$[:alnum:]]*))?\s*'
1157+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?(?:(async)\s+)?(function\b)(?:\s*(\*))?(?:(?:\s+|(?<=\*))([_$[:alpha:]][_$[:alnum:]]*))?\s*'
1022 captures:
1158 captures:
1023 1: keyword.control.export.tsx
1159 1: keyword.control.export.tsx
1024− 2: storage.modifier.async.tsx
1160+ 2: storage.modifier.tsx
1025− 3: storage.type.function.tsx
1161+ 3: storage.modifier.async.tsx
1026− 4: keyword.generator.asterisk.tsx
1162+ 4: storage.type.function.tsx
1027− 5: meta.definition.function.tsx entity.name.function.tsx
1163+ 5: keyword.generator.asterisk.tsx
1164+ 6: meta.definition.function.tsx entity.name.function.tsx
1029 - meta_scope: meta.function.tsx
1166 - meta_scope: meta.function.tsx
1030− - match: '(?=$|^|;)|(?<=\})'
1167+ - match: '(?=;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))|(?<=\})'
1031 pop: true
1168 pop: true
1032 - include: function-name
1169 - include: function-name
1033 - include: function-body
1170 - include: function-body
@@ -1040,9 +1177,10 @@ contexts:
1040 4: meta.definition.function.tsx entity.name.function.tsx
1177 4: meta.definition.function.tsx entity.name.function.tsx
1042 - meta_scope: meta.function.expression.tsx
1179 - meta_scope: meta.function.expression.tsx
1043− - match: '(?<=\})'
1180+ - match: '(?=;)|(?<=\})'
1044 pop: true
1181 pop: true
1045 - include: function-name
1182 - include: function-name
1183+ - include: single-line-comment-consuming-line-ending
1046 - include: function-body
1184 - include: function-body
1047 function-name:
1185 function-name:
1048 - match: "[_$[:alpha:]][_$[:alnum:]]*"
1186 - match: "[_$[:alpha:]][_$[:alnum:]]*"
@@ -1060,10 +1198,11 @@ contexts:
1060 - include: function-parameters-body
1198 - include: function-parameters-body
1061 function-parameters-body:
1199 function-parameters-body:
1062 - include: comment
1200 - include: comment
1063 - include: decorator
1202 - include: decorator
1064 - include: destructuring-parameter
1203 - include: destructuring-parameter
1065 - include: parameter-name
1204 - include: parameter-name
1066− - include: type-annotation
1205+ - include: parameter-type-annotation
1067 - include: variable-initializer
1206 - include: variable-initializer
1068 - match: ","
1207 - match: ","
1069 scope: punctuation.separator.parameter.tsx
1208 scope: punctuation.separator.parameter.tsx
@@ -1077,11 +1216,11 @@ contexts:
1077 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1216 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1079 ((async\s*)?(
1218 ((async\s*)?(
1080− ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
1219+ ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
1081 # sure shot arrow functions even if => is on new line
1220 # sure shot arrow functions even if => is on new line
1083− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
1222+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
1084− [(]\s*
1223+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
1086 ([)]\s*:) | # ():
1225 ([)]\s*:) | # ():
1087 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
1226 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -1092,9 +1231,9 @@ contexts:
1093 # arrow function possible to detect only with => on same line
1232 # arrow function possible to detect only with => on same line
1095− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
1234+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
1096− \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
1235+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
1097− (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
1236+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
1098 \s*=> # arrow operator
1237 \s*=> # arrow operator
@@ -1103,12 +1242,12 @@ contexts:
1103 1: punctuation.accessor.tsx
1242 1: punctuation.accessor.tsx
1104 2: punctuation.accessor.optional.tsx
1243 2: punctuation.accessor.optional.tsx
1105 3: entity.name.function.tsx
1244 3: entity.name.function.tsx
1106− - match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])'
1245+ - match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])'
1107 captures:
1246 captures:
1108 1: punctuation.accessor.tsx
1247 1: punctuation.accessor.tsx
1109 2: punctuation.accessor.optional.tsx
1248 2: punctuation.accessor.optional.tsx
1110 3: variable.other.constant.property.tsx
1249 3: variable.other.constant.property.tsx
1111− - match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*([_$[:alpha:]][_$[:alnum:]]*)'
1250+ - match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(\#?[_$[:alpha:]][_$[:alnum:]]*)'
1112 captures:
1251 captures:
1113 1: punctuation.accessor.tsx
1252 1: punctuation.accessor.tsx
1114 2: punctuation.accessor.optional.tsx
1253 2: punctuation.accessor.optional.tsx
@@ -1117,15 +1256,46 @@ contexts:
1117 scope: variable.other.constant.tsx
1256 scope: variable.other.constant.tsx
1118 - match: "[_$[:alpha:]][_$[:alnum:]]*"
1257 - match: "[_$[:alpha:]][_$[:alnum:]]*"
1119 scope: variable.other.readwrite.tsx
1258 scope: variable.other.readwrite.tsx
1260+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?=\bif\s*(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))\s*(?!\{))'
1262+ - match: '(?=;|$|\})'
1265+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(if)\s*(\()'
1267+ 1: keyword.control.conditional.tsx
1268+ 2: meta.brace.round.tsx
1272+ 0: meta.brace.round.tsx
1274+ - include: expression
1275+ - match: '(?<=\))\s*\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)*\])+\/([dgimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))'
1277+ 0: punctuation.definition.string.begin.tsx
1279+ - meta_scope: string.regexp.tsx
1280+ - match: "(/)([dgimsuy]*)"
1282+ 1: punctuation.definition.string.end.tsx
1283+ 2: keyword.other.tsx
1286+ - include: statements
1120 import-declaration:
1287 import-declaration:
1121− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(import)(?!\s*[:\(])(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1288+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)(?:\s+(type)(?!\s+from))?(?!\s*[:\(])(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1122 captures:
1289 captures:
1123 1: keyword.control.export.tsx
1290 1: keyword.control.export.tsx
1124− 2: keyword.control.import.tsx
1291+ 2: storage.modifier.tsx
1292+ 3: keyword.control.import.tsx
1293+ 4: keyword.control.type.tsx
1126 - meta_scope: meta.import.tsx
1295 - meta_scope: meta.import.tsx
1127 - match: '(?<!^import|[^\._$[:alnum:]]import)(?=;|$|^)'
1296 - match: '(?<!^import|[^\._$[:alnum:]]import)(?=;|$|^)'
1128 pop: true
1297 pop: true
1298+ - include: single-line-comment-consuming-line-ending
1129 - include: comment
1299 - include: comment
1130 - include: string
1300 - include: string
1131 - match: '(?<=^import|[^\._$[:alnum:]]import)(?!\s*["''])'
1301 - match: '(?<=^import|[^\._$[:alnum:]]import)(?!\s*["''])'
@@ -1137,14 +1307,16 @@ contexts:
1137 - include: import-export-declaration
1307 - include: import-export-declaration
1138 - include: import-export-declaration
1308 - include: import-export-declaration
1139 import-equals-declaration:
1309 import-equals-declaration:
1140− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(import)\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(require)\s*(\()'
1310+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)(?:\s+(type))?\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(require)\s*(\()'
1141 captures:
1311 captures:
1142 1: keyword.control.export.tsx
1312 1: keyword.control.export.tsx
1143− 2: keyword.control.import.tsx
1313+ 2: storage.modifier.tsx
1144− 3: variable.other.readwrite.alias.tsx
1314+ 3: keyword.control.import.tsx
1145− 4: keyword.operator.assignment.tsx
1315+ 4: keyword.control.type.tsx
1146− 5: keyword.control.require.tsx
1316+ 5: variable.other.readwrite.alias.tsx
1147− 6: meta.brace.round.tsx
1317+ 6: keyword.operator.assignment.tsx
1318+ 7: keyword.control.require.tsx
1319+ 8: meta.brace.round.tsx
1149 - meta_scope: meta.import-equals.external.tsx
1321 - meta_scope: meta.import-equals.external.tsx
1150 - match: \)
1322 - match: \)
@@ -1153,16 +1325,19 @@ contexts:
1153 pop: true
1325 pop: true
1154 - include: comment
1326 - include: comment
1155 - include: string
1327 - include: string
1156− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(import)\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(?!require\b)'
1328+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)(?:\s+(type))?\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(?!require\b)'
1157 captures:
1329 captures:
1158 1: keyword.control.export.tsx
1330 1: keyword.control.export.tsx
1159− 2: keyword.control.import.tsx
1331+ 2: storage.modifier.tsx
1160− 3: variable.other.readwrite.alias.tsx
1332+ 3: keyword.control.import.tsx
1161− 4: keyword.operator.assignment.tsx
1333+ 4: keyword.control.type.tsx
1334+ 5: variable.other.readwrite.alias.tsx
1335+ 6: keyword.operator.assignment.tsx
1163 - meta_scope: meta.import-equals.internal.tsx
1337 - meta_scope: meta.import-equals.internal.tsx
1164 - match: (?=;|$|^)
1338 - match: (?=;|$|^)
1165 pop: true
1339 pop: true
1340+ - include: single-line-comment-consuming-line-ending
1166 - include: comment
1341 - include: comment
1167 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))'
1342 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))'
1168 captures:
1343 captures:
@@ -1184,7 +1359,7 @@ contexts:
1184 - include: import-export-clause
1359 - include: import-export-clause
1185 import-export-clause:
1360 import-export-clause:
1186 - include: comment
1361 - include: comment
1187− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bdefault)|(\*)|(\b[_$[:alpha:]][_$[:alnum:]]*))\s+(as)\s+(?:(\bdefault(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|(\b[_$[:alpha:]][_$[:alnum:]]*))'
1362+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bdefault)|(\*)|(\b[_$[:alpha:]][_$[:alnum:]]*))\s+(as)\s+(?:(default(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|([_$[:alpha:]][_$[:alnum:]]*))'
1188 captures:
1363 captures:
1189 1: keyword.control.default.tsx
1364 1: keyword.control.default.tsx
1190 2: constant.language.import-export-all.tsx
1365 2: constant.language.import-export-all.tsx
@@ -1236,6 +1411,9 @@ contexts:
1236 2: keyword.operator.type.modifier.tsx
1411 2: keyword.operator.type.modifier.tsx
1237 3: keyword.operator.optional.tsx
1412 3: keyword.operator.optional.tsx
1238 pop: true
1413 pop: true
1414+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+'
1416+ 1: keyword.control.as.tsx
1239 - include: type
1417 - include: type
1240 inline-tags:
1418 inline-tags:
1241 - match: '(\[)[^\]]+(\])(?={@(?:link|linkcode|linkplain|tutorial))'
1419 - match: '(\[)[^\]]+(\])(?={@(?:link|linkcode|linkplain|tutorial))'
@@ -1267,15 +1445,16 @@ contexts:
1267 captures:
1445 captures:
1268 1: keyword.operator.expression.instanceof.tsx
1446 1: keyword.operator.expression.instanceof.tsx
1270− - match: '(?<=\))|(?=[;),}\]:?]|\|\||\&\&|$|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))function((\s+[_$[:alpha:]][_$[:alnum:]]*)|(\s*[\(]))))'
1448+ - match: '(?<=\))|(?=[;),}\]:?\-\+\>]|\|\||\&\&|\!\=\=|$|(([\&\~\^\|]\s*)?[_$[:alpha:]][_$[:alnum:]]*\s+instanceof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))function((\s+[_$[:alpha:]][_$[:alnum:]]*)|(\s*[\(]))))'
1271 pop: true
1449 pop: true
1272 - include: type
1450 - include: type
1273 interface-declaration:
1451 interface-declaration:
1274− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(export)\s+)?\b(?:(abstract)\s+)?\b(interface)\b(?=\s+|/[/*])'
1452+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(?:(abstract)\s+)?\b(interface)\b(?=\s+|/[/*])'
1275 captures:
1453 captures:
1276 1: keyword.control.export.tsx
1454 1: keyword.control.export.tsx
1277 2: storage.modifier.tsx
1455 2: storage.modifier.tsx
1278− 3: storage.type.interface.tsx
1456+ 3: storage.modifier.tsx
1457+ 4: storage.type.interface.tsx
1280 - meta_scope: meta.interface.tsx
1459 - meta_scope: meta.interface.tsx
1281 - match: '(?<=\})'
1460 - match: '(?<=\})'
@@ -1323,7 +1502,7 @@ contexts:
1323 captures:
1502 captures:
1324 0: punctuation.section.embedded.begin.tsx
1503 0: punctuation.section.embedded.begin.tsx
1326− - meta_scope: meta.embedded.expression.tsx
1505+ - meta_content_scope: meta.embedded.expression.tsx
1327 - match: '\}'
1506 - match: '\}'
1328 captures:
1507 captures:
1329 0: punctuation.section.embedded.end.tsx
1508 0: punctuation.section.embedded.end.tsx
@@ -1352,10 +1531,10 @@ contexts:
1352 pop: true
1531 pop: true
1353 - include: jsx-entities
1532 - include: jsx-entities
1354 jsx-tag:
1533 jsx-tag:
1355− - match: '(?=(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))'
1534+ - match: '(?=(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))'
1357 - meta_scope: meta.tag.tsx
1536 - meta_scope: meta.tag.tsx
1358− - match: '(/>)|(?:(</)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))?\s*(>))'
1537+ - match: '(/>)|(?:(</)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))?\s*(>))'
1359 captures:
1538 captures:
1360 1: punctuation.definition.tag.end.tsx
1539 1: punctuation.definition.tag.end.tsx
1361 2: punctuation.definition.tag.begin.tsx
1540 2: punctuation.definition.tag.begin.tsx
@@ -1365,7 +1544,7 @@ contexts:
1365 6: support.class.component.tsx
1544 6: support.class.component.tsx
1366 7: punctuation.definition.tag.end.tsx
1545 7: punctuation.definition.tag.end.tsx
1367 pop: true
1546 pop: true
1368− - match: '(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>)'
1547+ - match: '(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>)'
1369 captures:
1548 captures:
1370 1: punctuation.definition.tag.begin.tsx
1549 1: punctuation.definition.tag.begin.tsx
1371 2: entity.name.tag.namespace.tsx
1550 2: entity.name.tag.namespace.tsx
@@ -1393,8 +1572,8 @@ contexts:
1393 - match: |-
1572 - match: |-
1396− (?:([_$[:alpha:]][-$[:alnum:].]*)(:))?
1575+ (?:([_$[:alpha:]][-_$[:alnum:].]*)(:))?
1397− ([_$[:alpha:]][-$[:alnum:]]*)
1576+ ([_$[:alpha:]][-_$[:alnum:]]*)
1398 (?=\s|=|/?>|/\*|//)
1577 (?=\s|=|/?>|/\*|//)
1399 captures:
1578 captures:
1400 1: entity.other.attribute-name.namespace.tsx
1579 1: entity.other.attribute-name.namespace.tsx
@@ -1419,15 +1598,15 @@ contexts:
1419 jsx-tag-in-expression:
1598 jsx-tag-in-expression:
1420 - match: |-
1599 - match: |-
1422− (?<!\+\+|--)(?<=[({\[,?=>:*]|&&|\|\||\?|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^default|[^\._$[:alnum:]]default|^yield|[^\._$[:alnum:]]yield|^)\s*
1601+ (?<!\+\+|--)(?<=[({\[,?=>:*]|&&|\|\||\?|\*\/|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^default|[^\._$[:alnum:]]default|^yield|[^\._$[:alnum:]]yield|^)\s*
1423 (?!<\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s+[^=>])|,)) # look ahead is not type parameter of arrow
1602 (?!<\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s+[^=>])|,)) # look ahead is not type parameter of arrow
1424− (?=(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))
1603+ (?=(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))
1426− - match: '(?!(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))'
1605+ - match: '(?!(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))'
1427 pop: true
1606 pop: true
1428 - include: jsx-tag
1607 - include: jsx-tag
1429 jsx-tag-without-attributes:
1608 jsx-tag-without-attributes:
1430− - match: '(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))?\s*(>)'
1609+ - match: '(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))?\s*(>)'
1431 captures:
1610 captures:
1432 1: punctuation.definition.tag.begin.tsx
1611 1: punctuation.definition.tag.begin.tsx
1433 2: entity.name.tag.namespace.tsx
1612 2: entity.name.tag.namespace.tsx
@@ -1438,7 +1617,7 @@ contexts:
1439 - meta_scope: meta.tag.without-attributes.tsx
1618 - meta_scope: meta.tag.without-attributes.tsx
1440 - meta_content_scope: meta.jsx.children.tsx
1619 - meta_content_scope: meta.jsx.children.tsx
1441− - match: '(</)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))?\s*(>)'
1620+ - match: '(</)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))?\s*(>)'
1442 captures:
1621 captures:
1443 1: punctuation.definition.tag.begin.tsx
1622 1: punctuation.definition.tag.begin.tsx
1444 2: entity.name.tag.namespace.tsx
1623 2: entity.name.tag.namespace.tsx
@@ -1449,9 +1628,9 @@ contexts:
1449 pop: true
1628 pop: true
1450 - include: jsx-children
1629 - include: jsx-children
1451 jsx-tag-without-attributes-in-expression:
1630 jsx-tag-without-attributes-in-expression:
1452− - match: '(?<!\+\+|--)(?<=[({\[,?=>:*]|&&|\|\||\?|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^default|[^\._$[:alnum:]]default|^yield|[^\._$[:alnum:]]yield|^)\s*(?=(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))?\s*(>))'
1631+ - match: '(?<!\+\+|--)(?<=[({\[,?=>:*]|&&|\|\||\?|\*\/|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^default|[^\._$[:alnum:]]default|^yield|[^\._$[:alnum:]]yield|^)\s*(?=(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))?\s*(>))'
1454− - match: '(?!(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))?\s*(>))'
1633+ - match: '(?!(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))?\s*(>))'
1455 pop: true
1634 pop: true
1456 - include: jsx-tag-without-attributes
1635 - include: jsx-tag-without-attributes
@@ -1477,25 +1656,27 @@ contexts:
1477 - include: this-literal
1656 - include: this-literal
1478 - include: super-literal
1657 - include: super-literal
1479 method-declaration:
1658 method-declaration:
1480− - match: '(?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?\s*\b(constructor)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1659+ - match: '(?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(override)\s+)?(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?\s*\b(constructor)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1481 captures:
1660 captures:
1482 1: storage.modifier.tsx
1661 1: storage.modifier.tsx
1483 2: storage.modifier.tsx
1662 2: storage.modifier.tsx
1484− 3: storage.modifier.async.tsx
1663+ 3: storage.modifier.tsx
1485− 4: storage.type.tsx
1664+ 4: storage.modifier.async.tsx
1665+ 5: storage.type.tsx
1487 - meta_scope: meta.method.declaration.tsx
1667 - meta_scope: meta.method.declaration.tsx
1488 - match: '(?=\}|;|,|$)|(?<=\})'
1668 - match: '(?=\}|;|,|$)|(?<=\})'
1489 pop: true
1669 pop: true
1490 - include: method-declaration-name
1670 - include: method-declaration-name
1491 - include: function-body
1671 - include: function-body
1492− - match: '(?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?(?:(?:\s*\b(new)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|(?:(\*)\s*)?)(?=\s*[\(\<])'
1672+ - match: '(?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(override)\s+)?(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?(?:(?:\s*\b(new)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|(?:(\*)\s*)?)(?=\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(])'
1493 captures:
1673 captures:
1494 1: storage.modifier.tsx
1674 1: storage.modifier.tsx
1495 2: storage.modifier.tsx
1675 2: storage.modifier.tsx
1496− 3: storage.modifier.async.tsx
1676+ 3: storage.modifier.tsx
1497− 4: keyword.operator.new.tsx
1677+ 4: storage.modifier.async.tsx
1498− 5: keyword.generator.asterisk.tsx
1678+ 5: keyword.operator.new.tsx
1679+ 6: keyword.generator.asterisk.tsx
1500 - meta_scope: meta.method.declaration.tsx
1681 - meta_scope: meta.method.declaration.tsx
1501 - match: '(?=\}|;|,|$)|(?<=\})'
1682 - match: '(?=\}|;|,|$)|(?<=\})'
@@ -1503,22 +1684,23 @@ contexts:
1503 - include: method-declaration-name
1684 - include: method-declaration-name
1504 - include: function-body
1685 - include: function-body
1505 - match: |-
1686 - match: |-
1506− (?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_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
1687+ (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(override)\s+)?(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?(?:\b(get|set)\s+)?(?:(\*)\s*)?(?=\s*(((\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?<!\$)(?:
1507− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1688+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1508− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1689+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1509− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1690+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1510− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1691+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1511− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1692+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1512− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1693+ (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1513− (?:\B(\.)[0-9][0-9_]*\b)| # .1
1694+ (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1514− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1695+ (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1515− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*[\(\<])
1696+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(])
1516 captures:
1697 captures:
1517 1: storage.modifier.tsx
1698 1: storage.modifier.tsx
1518 2: storage.modifier.tsx
1699 2: storage.modifier.tsx
1519− 3: storage.modifier.async.tsx
1700+ 3: storage.modifier.tsx
1520− 4: storage.type.property.tsx
1701+ 4: storage.modifier.async.tsx
1521− 5: keyword.generator.asterisk.tsx
1702+ 5: storage.type.property.tsx
1703+ 6: keyword.generator.asterisk.tsx
1523 - meta_scope: meta.method.declaration.tsx
1705 - meta_scope: meta.method.declaration.tsx
1524 - match: '(?=\}|;|,|$)|(?<=\})'
1706 - match: '(?=\}|;|,|$)|(?<=\})'
@@ -1527,16 +1709,16 @@ contexts:
1527 - include: function-body
1709 - include: function-body
1528 method-declaration-name:
1710 method-declaration-name:
1529 - match: |-
1711 - match: |-
1530− (?x)(?=((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
1712+ (?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(?!\$))|((?<!\$)(?:
1531− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1713+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1532− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1714+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1533− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1715+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1534− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1716+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1535− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1717+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1536− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1718+ (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1537− (?:\B(\.)[0-9][0-9_]*\b)| # .1
1719+ (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1538− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1720+ (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1539− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??)\s*[\(\<])
1721+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??)\s*[\(\<])
1541 - match: (?=\(|\<)
1723 - match: (?=\(|\<)
1542 pop: true
1724 pop: true
@@ -1548,13 +1730,14 @@ contexts:
1548 - match: \?
1730 - match: \?
1549 scope: keyword.operator.optional.tsx
1731 scope: keyword.operator.optional.tsx
1550 namespace-declaration:
1732 namespace-declaration:
1551− - match: '(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(namespace|module)\s+(?=[_$[:alpha:]"''`]))'
1733+ - match: '(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(namespace|module)\s+(?=[_$[:alpha:]"''`]))'
1552 captures:
1734 captures:
1553 1: keyword.control.export.tsx
1735 1: keyword.control.export.tsx
1554− 2: storage.type.namespace.tsx
1736+ 2: storage.modifier.tsx
1737+ 3: storage.type.namespace.tsx
1556 - meta_scope: meta.namespace.declaration.tsx
1739 - meta_scope: meta.namespace.declaration.tsx
1557− - match: '(?<=\})|(?=;|^\s*abstract\b|^\s*async\b|^\s*class\b|^\s*const\b|^\s*declare\b|^\s*enum\b|^\s*export\b|^\s*function\b|^\s*import\b|^\s*interface\b|^\s*let\b|^\s*module\b|^\s*namespace\b|^\s*return\b|^\s*type\b|^\s*var\b)'
1740+ - match: '(?<=\})|(?=;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
1558 pop: true
1741 pop: true
1559 - include: comment
1742 - include: comment
1560 - include: string
1743 - include: string
@@ -1568,41 +1751,53 @@ contexts:
1568 1: keyword.operator.new.tsx
1751 1: keyword.operator.new.tsx
1570 - meta_scope: new.expr.tsx
1753 - meta_scope: new.expr.tsx
1571− - match: '(?<=\))|(?=[;),}\]:]|\|\||\&\&|$|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))new(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))function((\s+[_$[:alpha:]][_$[:alnum:]]*)|(\s*[\(]))))'
1754+ - match: '(?<=\))|(?=[;),}\]:?\-\+\>]|\|\||\&\&|\!\=\=|$|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))new(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))function((\s+[_$[:alpha:]][_$[:alnum:]]*)|(\s*[\(]))))'
1572 pop: true
1755 pop: true
1573− - include: paren-expression
1756+ - include: expression
1574− - include: class-declaration
1576 null-literal:
1757 null-literal:
1577 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))null(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1758 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))null(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1578 scope: constant.language.null.tsx
1759 scope: constant.language.null.tsx
1579 numeric-literal:
1760 numeric-literal:
1580− - match: '\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$)'
1761+ - match: '\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$)'
1581 scope: constant.numeric.hex.tsx
1762 scope: constant.numeric.hex.tsx
1582− - match: '\b(?<!\$)0(b|B)[01][01_]*\b(?!\$)'
1763+ captures:
1764+ 1: storage.type.numeric.bigint.tsx
1765+ - match: '\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$)'
1583 scope: constant.numeric.binary.tsx
1766 scope: constant.numeric.binary.tsx
1584− - match: '\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$)'
1767+ captures:
1768+ 1: storage.type.numeric.bigint.tsx
1769+ - match: '\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$)'
1585 scope: constant.numeric.octal.tsx
1770 scope: constant.numeric.octal.tsx
1772+ 1: storage.type.numeric.bigint.tsx
1586 - match: |-
1773 - match: |-
1588 (?<!\$)(?:
1775 (?<!\$)(?:
1589− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1776+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1590− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1777+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1591− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1778+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1592− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1779+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1593− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1780+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1594− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1781+ (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1595− (?:\B(\.)[0-9][0-9_]*\b)| # .1
1782+ (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1596− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1783+ (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1598 captures:
1785 captures:
1599 0: constant.numeric.decimal.tsx
1786 0: constant.numeric.decimal.tsx
1600 1: meta.delimiter.decimal.period.tsx
1787 1: meta.delimiter.decimal.period.tsx
1601− 2: meta.delimiter.decimal.period.tsx
1788+ 2: storage.type.numeric.bigint.tsx
1602 3: meta.delimiter.decimal.period.tsx
1789 3: meta.delimiter.decimal.period.tsx
1603− 4: meta.delimiter.decimal.period.tsx
1790+ 4: storage.type.numeric.bigint.tsx
1604 5: meta.delimiter.decimal.period.tsx
1791 5: meta.delimiter.decimal.period.tsx
1605− 6: meta.delimiter.decimal.period.tsx
1792+ 6: storage.type.numeric.bigint.tsx
1793+ 7: storage.type.numeric.bigint.tsx
1794+ 8: meta.delimiter.decimal.period.tsx
1795+ 9: storage.type.numeric.bigint.tsx
1796+ 10: meta.delimiter.decimal.period.tsx
1797+ 11: storage.type.numeric.bigint.tsx
1798+ 12: meta.delimiter.decimal.period.tsx
1799+ 13: storage.type.numeric.bigint.tsx
1800+ 14: storage.type.numeric.bigint.tsx
1606 numericConstant-literal:
1801 numericConstant-literal:
1607 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))NaN(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1802 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))NaN(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1608 scope: constant.language.nan.tsx
1803 scope: constant.language.nan.tsx
@@ -1611,16 +1806,16 @@ contexts:
1611 object-binding-element:
1806 object-binding-element:
1612 - include: comment
1807 - include: comment
1613 - match: |-
1808 - match: |-
1614− (?x)(?=((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
1809+ (?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(?!\$))|((?<!\$)(?:
1615− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1810+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1616− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1811+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1617− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1812+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1618− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1813+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1619− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1814+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1620− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1815+ (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1621− (?:\B(\.)[0-9][0-9_]*\b)| # .1
1816+ (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1622− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1817+ (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1623− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
1818+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
1625 - match: '(?=,|\})'
1820 - match: '(?=,|\})'
1626 pop: true
1821 pop: true
@@ -1633,16 +1828,16 @@ contexts:
1633 object-binding-element-const:
1828 object-binding-element-const:
1634 - include: comment
1829 - include: comment
1635 - match: |-
1830 - match: |-
1636− (?x)(?=((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
1831+ (?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(?!\$))|((?<!\$)(?:
1637− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1832+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1638− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1833+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1639− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1834+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1640− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1835+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1641− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1836+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1642− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1837+ (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1643− (?:\B(\.)[0-9][0-9_]*\b)| # .1
1838+ (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1644− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1839+ (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1645− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
1840+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
1647 - match: '(?=,|\})'
1842 - match: '(?=,|\})'
1648 pop: true
1843 pop: true
@@ -1654,16 +1849,16 @@ contexts:
1654 - include: punctuation-comma
1849 - include: punctuation-comma
1655 object-binding-element-propertyName:
1850 object-binding-element-propertyName:
1656 - match: |-
1851 - match: |-
1657− (?x)(?=((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
1852+ (?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(?!\$))|((?<!\$)(?:
1658− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1853+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1659− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1854+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1660− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1855+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1661− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1856+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1662− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1857+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1663− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1858+ (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1664− (?:\B(\.)[0-9][0-9_]*\b)| # .1
1859+ (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1665− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1860+ (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1666− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
1861+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
1668 - match: (:)
1863 - match: (:)
1669 captures:
1864 captures:
@@ -1701,9 +1896,9 @@ contexts:
1701 scope: support.class.tsx
1896 scope: support.class.tsx
1702 - match: |-
1897 - match: |-
1703 (?x)(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(?:
1898 (?x)(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(?:
1704− ([[:upper:]][_$[:digit:][:upper:]]*) |
1899+ (\#?[[:upper:]][_$[:digit:][:upper:]]*) |
1705− ([_$[:alpha:]][_$[:alnum:]]*)
1900+ (\#?[_$[:alpha:]][_$[:alnum:]]*)
1706− )(?=\s*\??\.\s*[_$[:alpha:]][_$[:alnum:]]*)
1901+ )(?=\s*\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*)
1707 captures:
1902 captures:
1708 1: punctuation.accessor.tsx
1903 1: punctuation.accessor.tsx
1709 2: punctuation.accessor.optional.tsx
1904 2: punctuation.accessor.optional.tsx
@@ -1713,7 +1908,7 @@ contexts:
1714 ([[:upper:]][_$[:digit:][:upper:]]*) |
1909 ([[:upper:]][_$[:digit:][:upper:]]*) |
1715 ([_$[:alpha:]][_$[:alnum:]]*)
1910 ([_$[:alpha:]][_$[:alnum:]]*)
1716− )(?=\s*\??\.\s*[_$[:alpha:]][_$[:alnum:]]*)
1911+ )(?=\s*\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*)
1717 captures:
1912 captures:
1718 1: variable.other.constant.object.tsx
1913 1: variable.other.constant.object.tsx
1719 2: variable.other.object.tsx
1914 2: variable.other.object.tsx
@@ -1730,16 +1925,16 @@ contexts:
1730 - include: object-member
1925 - include: object-member
1731 object-literal-method-declaration:
1926 object-literal-method-declaration:
1732 - match: |-
1927 - match: |-
1733− (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(async)\s+)?(?:\b(get|set)\s+)?(?:(\*)\s*)?(?=\s*(((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
1928+ (?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(?!\$))|((?<!\$)(?:
1734− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1929+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1735− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1930+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1736− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1931+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1737− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1932+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1738− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1933+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1739− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1934+ (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1740− (?:\B(\.)[0-9][0-9_]*\b)| # .1
1935+ (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1741− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1936+ (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1742− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*[\(\<])
1937+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(])
1743 captures:
1938 captures:
1744 1: storage.modifier.async.tsx
1939 1: storage.modifier.async.tsx
1745 2: storage.type.property.tsx
1940 2: storage.type.property.tsx
@@ -1751,16 +1946,16 @@ contexts:
1751 - include: method-declaration-name
1946 - include: method-declaration-name
1752 - include: function-body
1947 - include: function-body
1753 - match: |-
1948 - match: |-
1754− (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(async)\s+)?(?:\b(get|set)\s+)?(?:(\*)\s*)?(?=\s*(((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
1949+ (?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(?!\$))|((?<!\$)(?:
1755− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1950+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1756− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1951+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1757− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1952+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1758− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1953+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1759− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1954+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1760− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1955+ (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1761− (?:\B(\.)[0-9][0-9_]*\b)| # .1
1956+ (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1762− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1957+ (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1763− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*[\(\<])
1958+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(])
1764 captures:
1959 captures:
1765 1: storage.modifier.async.tsx
1960 1: storage.modifier.async.tsx
1766 2: storage.type.property.tsx
1961 2: storage.type.property.tsx
@@ -1777,37 +1972,56 @@ contexts:
1777 - meta_scope: meta.object.member.tsx meta.object-literal.key.tsx
1972 - meta_scope: meta.object.member.tsx meta.object-literal.key.tsx
1778 - match: '(?=:)|((?<=[\]])(?=\s*[\(\<]))'
1973 - match: '(?=:)|((?<=[\]])(?=\s*[\(\<]))'
1779 pop: true
1974 pop: true
1780 - include: array-literal
1976 - include: array-literal
1781− - match: '(?=[\''\"])'
1977+ - match: '(?=[\''\"\`])'
1783 - meta_scope: meta.object.member.tsx meta.object-literal.key.tsx
1979 - meta_scope: meta.object.member.tsx meta.object-literal.key.tsx
1784− - match: '(?=:)|((?<=[\''\"])(?=\s*[\(\<]))'
1980+ - match: '(?=:)|((?<=[\''\"\`])(?=((\s*[\(\<,}])|(\s+(as)\s+))))'
1785 pop: true
1981 pop: true
1786 - include: string
1983 - include: string
1787− - match: '(?<=[\]\''\"])(?=\s*[\(\<])'
1984+ - match: |-
1985+ (?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(?!\$))|((?<!\$)(?:
1986+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1987+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1988+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1989+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1990+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1991+ (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1992+ (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1993+ (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1996+ - meta_scope: meta.object.member.tsx meta.object-literal.key.tsx
1997+ - match: '(?=:)|(?=\s*([\(\<,}])|(\s+as\s+))'
2000+ - include: numeric-literal
2001+ - match: '(?<=[\]\''\"\`])(?=\s*[\(\<])'
1789 - meta_scope: meta.method.declaration.tsx
2003 - meta_scope: meta.method.declaration.tsx
1790 - match: '(?=\}|;|,)|(?<=\})'
2004 - match: '(?=\}|;|,)|(?<=\})'
1791 pop: true
2005 pop: true
1792 - include: function-body
2006 - include: function-body
1793− - match: '(?![_$[:alpha:]])([[:digit:]]+)\s*(?=:)'
2007+ - match: '(?![_$[:alpha:]])([[:digit:]]+)\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*:)'
1794 scope: meta.object.member.tsx
2008 scope: meta.object.member.tsx
1795 captures:
2009 captures:
1796 0: meta.object-literal.key.tsx
2010 0: meta.object-literal.key.tsx
1797 1: constant.numeric.decimal.tsx
2011 1: constant.numeric.decimal.tsx
1798 - match: |-
2012 - match: |-
1799− (?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\s*(?=:\s*(
2013+ (?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*:(\s*\/\*([^\*]|(\*[^\/]))*\*\/)*\s*(
1800 ((async\s+)?(
2014 ((async\s+)?(
1801 (function\s*[(<*]) |
2015 (function\s*[(<*]) |
1802 (function\s+) |
2016 (function\s+) |
1803 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
2017 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1805 ((async\s*)?(
2019 ((async\s*)?(
1806− ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
2020+ ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
1807 # sure shot arrow functions even if => is on new line
2021 # sure shot arrow functions even if => is on new line
1809− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
2023+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
1810− [(]\s*
2024+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
1812 ([)]\s*:) | # ():
2026 ([)]\s*:) | # ():
1813 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
2027 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -1818,9 +2032,9 @@ contexts:
1819 # arrow function possible to detect only with => on same line
2033 # arrow function possible to detect only with => on same line
1821− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
2035+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
1822− \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
2036+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
1823− (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
2037+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
1824 \s*=> # arrow operator
2038 \s*=> # arrow operator
@@ -1829,7 +2043,7 @@ contexts:
1829 captures:
2043 captures:
1830 0: meta.object-literal.key.tsx
2044 0: meta.object-literal.key.tsx
1831 1: entity.name.function.tsx
2045 1: entity.name.function.tsx
1832− - match: '(?:[_$[:alpha:]][_$[:alnum:]]*)\s*(?=:)'
2046+ - match: '(?:[_$[:alpha:]][_$[:alnum:]]*)\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*:)'
1833 scope: meta.object.member.tsx
2047 scope: meta.object.member.tsx
1834 captures:
2048 captures:
1835 0: meta.object-literal.key.tsx
2049 0: meta.object-literal.key.tsx
@@ -1841,14 +2055,27 @@ contexts:
1841 - match: '(?=,|\})'
2055 - match: '(?=,|\})'
1842 pop: true
2056 pop: true
1843 - include: expression
2057 - include: expression
1844− - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?=,|\}|$)'
2058+ - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?=,|\}|$|\/\/|\/\*)'
1845 scope: meta.object.member.tsx
2059 scope: meta.object.member.tsx
1846 captures:
2060 captures:
1847 1: variable.other.readwrite.tsx
2061 1: variable.other.readwrite.tsx
2062+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+(const)(?=\s*([,}]|$))'
2063+ scope: meta.object.member.tsx
2065+ 1: keyword.control.as.tsx
2066+ 2: storage.modifier.tsx
2067+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+'
2069+ 1: keyword.control.as.tsx
2071+ - meta_scope: meta.object.member.tsx
2072+ - match: '(?=[;),}\]:?\-\+\>]|\|\||\&\&|\!\=\=|$|^|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+))'
1848 - match: '(?=[_$[:alpha:]][_$[:alnum:]]*\s*=)'
2075 - match: '(?=[_$[:alpha:]][_$[:alnum:]]*\s*=)'
1850 - meta_scope: meta.object.member.tsx
2077 - meta_scope: meta.object.member.tsx
1851− - match: '(?=,|\}|$)'
2078+ - match: '(?=,|\}|$|\/\/|\/\*)'
1852 pop: true
2079 pop: true
1853 - include: expression
2080 - include: expression
1854 - match: ":"
2081 - match: ":"
@@ -1858,7 +2085,7 @@ contexts:
1858 - meta_scope: meta.object.member.tsx
2085 - meta_scope: meta.object.member.tsx
1859 - match: '(?=,|\})'
2086 - match: '(?=,|\})'
1860 pop: true
2087 pop: true
1861− - match: '(?<=:)\s*(async)?(?=\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)\(\s*([\{\[]\s*)?$)'
2088+ - match: '(?<=:)\s*(async)?(?=\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)\(\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))'
1862 captures:
2089 captures:
1863 1: storage.modifier.async.tsx
2090 1: storage.modifier.async.tsx
@@ -1874,7 +2101,7 @@ contexts:
1874 0: meta.brace.round.tsx
2101 0: meta.brace.round.tsx
1875 pop: true
2102 pop: true
1876 - include: expression-inside-possibly-arrow-parens
2103 - include: expression-inside-possibly-arrow-parens
1877− - match: '(?<=:)\s*(async)?\s*(\()(?=\s*([\{\[]\s*)?$)'
2104+ - match: '(?<=:)\s*(async)?\s*(\()(?=\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))'
1878 captures:
2105 captures:
1879 1: storage.modifier.async.tsx
2106 1: storage.modifier.async.tsx
1880 2: meta.brace.round.tsx
2107 2: meta.brace.round.tsx
@@ -1884,6 +2111,23 @@ contexts:
1884 0: meta.brace.round.tsx
2111 0: meta.brace.round.tsx
1885 pop: true
2112 pop: true
1886 - include: expression-inside-possibly-arrow-parens
2113 - include: expression-inside-possibly-arrow-parens
2114+ - match: (?<=:)\s*(async)?\s*(?=\<\s*$)
2116+ 1: storage.modifier.async.tsx
2120+ - include: type-parameters
2121+ - match: '(?<=\>)\s*(\()(?=\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))'
2123+ 1: meta.brace.round.tsx
2127+ 0: meta.brace.round.tsx
2129+ - include: expression-inside-possibly-arrow-parens
2130+ - include: possibly-arrow-return-type
1887 - include: expression
2131 - include: expression
1888 - include: punctuation-comma
2132 - include: punctuation-comma
1889 parameter-array-binding-pattern:
2133 parameter-array-binding-pattern:
@@ -1901,16 +2145,18 @@ contexts:
1901 parameter-binding-element:
2145 parameter-binding-element:
1902 - include: comment
2146 - include: comment
1903 - include: string
2147 - include: string
2148+ - include: numeric-literal
1904 - include: parameter-object-binding-pattern
2150 - include: parameter-object-binding-pattern
1905 - include: parameter-array-binding-pattern
2151 - include: parameter-array-binding-pattern
1906 - include: destructuring-parameter-rest
2152 - include: destructuring-parameter-rest
1907 - include: variable-initializer
2153 - include: variable-initializer
1908 parameter-name:
2154 parameter-name:
1909− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|protected|private|readonly)\s+(?=(public|protected|private|readonly)\s+)'
2155+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|protected|private|readonly)\s+(?=(override|public|protected|private|readonly)\s+)'
1910 captures:
2156 captures:
1911 1: storage.modifier.tsx
2157 1: storage.modifier.tsx
1912 - match: |-
2158 - match: |-
1913− (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*
2159+ (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*
1914 # function assignment |
2160 # function assignment |
1916 ((async\s+)?(
2162 ((async\s+)?(
@@ -1919,11 +2165,11 @@ contexts:
1919 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
2165 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1921 ((async\s*)?(
2167 ((async\s*)?(
1922− ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
2168+ ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
1923 # sure shot arrow functions even if => is on new line
2169 # sure shot arrow functions even if => is on new line
1925− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
2171+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
1926− [(]\s*
2172+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
1928 ([)]\s*:) | # ():
2174 ([)]\s*:) | # ():
1929 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
2175 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -1934,9 +2180,9 @@ contexts:
1935 # arrow function possible to detect only with => on same line
2181 # arrow function possible to detect only with => on same line
1937− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
2183+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
1938− \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
2184+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
1939− (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
2185+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
1940 \s*=> # arrow operator
2186 \s*=> # arrow operator
@@ -1953,19 +2199,20 @@ contexts:
1956− (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$))) |
2202+ (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
1957− (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
2203+ (:\s*((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
2204+ (:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
1958 ((async\s+)?(
2205 ((async\s+)?(
1959 (function\s*[(<*]) |
2206 (function\s*[(<*]) |
1960 (function\s+) |
2207 (function\s+) |
1961 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
2208 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1963 ((async\s*)?(
2210 ((async\s*)?(
1964− ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
2211+ ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
1965 # sure shot arrow functions even if => is on new line
2212 # sure shot arrow functions even if => is on new line
1967− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
2214+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
1968− [(]\s*
2215+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
1970 ([)]\s*:) | # ():
2217 ([)]\s*:) | # ():
1971 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
2218 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -1976,9 +2223,9 @@ contexts:
1977 # arrow function possible to detect only with => on same line
2224 # arrow function possible to detect only with => on same line
1979− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
2226+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
1980− \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
2227+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
1981− (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
2228+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
1982 \s*=> # arrow operator
2229 \s*=> # arrow operator
@@ -1989,7 +2236,7 @@ contexts:
1989 3: entity.name.function.tsx variable.language.this.tsx
2236 3: entity.name.function.tsx variable.language.this.tsx
1990 4: entity.name.function.tsx
2237 4: entity.name.function.tsx
1991 5: keyword.operator.optional.tsx
2238 5: keyword.operator.optional.tsx
1992− - match: '(?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)'
2239+ - match: '(?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)'
1993 captures:
2240 captures:
1994 1: storage.modifier.tsx
2241 1: storage.modifier.tsx
1995 2: keyword.operator.rest.tsx
2242 2: keyword.operator.rest.tsx
@@ -1999,16 +2246,16 @@ contexts:
1999 parameter-object-binding-element:
2246 parameter-object-binding-element:
2000 - include: comment
2247 - include: comment
2001 - match: |-
2248 - match: |-
2002− (?x)(?=((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
2249+ (?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(?!\$))|((?<!\$)(?:
2003− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
2250+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
2004− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
2251+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
2005− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
2252+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
2006− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
2253+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
2007− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
2254+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
2008− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
2255+ (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
2009− (?:\B(\.)[0-9][0-9_]*\b)| # .1
2256+ (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
2010− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
2257+ (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
2011− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
2258+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
2013 - match: '(?=,|\})'
2260 - match: '(?=,|\})'
2014 pop: true
2261 pop: true
@@ -2029,6 +2276,15 @@ contexts:
2029 0: punctuation.definition.binding-pattern.object.tsx
2276 0: punctuation.definition.binding-pattern.object.tsx
2030 pop: true
2277 pop: true
2031 - include: parameter-object-binding-element
2278 - include: parameter-object-binding-element
2279+ parameter-type-annotation:
2282+ 1: keyword.operator.type.annotation.tsx
2284+ - meta_scope: meta.type.annotation.tsx
2285+ - match: "(?=[,)])|(?==[^>])"
2032 paren-expression:
2288 paren-expression:
2033 - match: \(
2289 - match: \(
2034 captures:
2290 captures:
@@ -2040,14 +2296,14 @@ contexts:
2040 pop: true
2296 pop: true
2041 - include: expression
2297 - include: expression
2042 paren-expression-possibly-arrow:
2298 paren-expression-possibly-arrow:
2043− - match: '(?<=[(=,])\s*(async)?(?=\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*))?\(\s*[\{\[]\s*$)'
2299+ - match: '(?<=[(=,])\s*(async)?(?=\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?\(\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))'
2044 captures:
2300 captures:
2045 1: storage.modifier.async.tsx
2301 1: storage.modifier.async.tsx
2047 - match: (?<=\))
2303 - match: (?<=\))
2048 pop: true
2304 pop: true
2049 - include: paren-expression-possibly-arrow-with-typeparameters
2305 - include: paren-expression-possibly-arrow-with-typeparameters
2050− - match: '(?<=[(=,]|=>)\s*(async)?(?=\s*((((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*))?\()|(<))\s*$)'
2306+ - match: '(?<=[(=,]|=>|^return|[^\._$[:alnum:]]return)\s*(async)?(?=\s*((((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?\()|(<))\s*$)'
2051 captures:
2307 captures:
2052 1: storage.modifier.async.tsx
2308 1: storage.modifier.async.tsx
@@ -2067,7 +2323,7 @@ contexts:
2067 pop: true
2323 pop: true
2068 - include: expression-inside-possibly-arrow-parens
2324 - include: expression-inside-possibly-arrow-parens
2069 possibly-arrow-return-type:
2325 possibly-arrow-return-type:
2070− - match: '(?<=\))\s*(:)(?=\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+\s*=>)'
2326+ - match: '(?<=\)|^)\s*(:)(?=\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*=>)'
2071 captures:
2327 captures:
2072 1: meta.arrow.tsx meta.return.type.arrow.tsx keyword.operator.type.annotation.tsx
2328 1: meta.arrow.tsx meta.return.type.arrow.tsx keyword.operator.type.annotation.tsx
@@ -2114,23 +2370,23 @@ contexts:
2114 pop: true
2370 pop: true
2115 - include: string-character-escape
2371 - include: string-character-escape
2117− - match: '(?<!\+\+|--|})(?<=[=(:,\[?+!]|^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case|=>|&&|\|\||\*\/)\s*(\/)(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)+\])+\/[gimsuy]*(?!\s*[a-zA-Z0-9_$]))'
2373+ - match: '(?<!\+\+|--|})(?<=[=(:,\[?+!]|^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case|=>|&&|\|\||\*\/)\s*(\/)(?![\/*])(?=(?:[^\/\\\[\()]|\\.|\[([^\]\\]|\\.)+\]|\(([^\)\\]|\\.)+\))+\/([dgimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))'
2118 captures:
2374 captures:
2119 1: punctuation.definition.string.begin.tsx
2375 1: punctuation.definition.string.begin.tsx
2121 - meta_scope: string.regexp.tsx
2377 - meta_scope: string.regexp.tsx
2122− - match: "(/)([gimsuy]*)"
2378+ - match: "(/)([dgimsuy]*)"
2123 captures:
2379 captures:
2124 1: punctuation.definition.string.end.tsx
2380 1: punctuation.definition.string.end.tsx
2125 2: keyword.other.tsx
2381 2: keyword.other.tsx
2126 pop: true
2382 pop: true
2127 - include: regexp
2383 - include: regexp
2128− - match: '(?<![_$[:alnum:])\]]|\+\+|--|})\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)+\])+\/[gimsuy]*(?!\s*[a-zA-Z0-9_$]))'
2384+ - match: '((?<![_$[:alnum:])\]]|\+\+|--|}|\*\/)|((?<=^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case))\s*)\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)*\])+\/([dgimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))'
2129 captures:
2385 captures:
2130 0: punctuation.definition.string.begin.tsx
2386 0: punctuation.definition.string.begin.tsx
2132 - meta_scope: string.regexp.tsx
2388 - meta_scope: string.regexp.tsx
2133− - match: "(/)([gimsuy]*)"
2389+ - match: "(/)([dgimsuy]*)"
2134 captures:
2390 captures:
2135 1: punctuation.definition.string.end.tsx
2391 1: punctuation.definition.string.end.tsx
2136 2: keyword.other.tsx
2392 2: keyword.other.tsx
@@ -2230,10 +2486,24 @@ contexts:
2230 - include: type-object
2486 - include: type-object
2231 - include: type-predicate-operator
2487 - include: type-predicate-operator
2232 - include: type
2488 - include: type
2490+ - match: \A(#!).*(?=$)
2491+ scope: comment.line.shebang.tsx
2493+ 1: punctuation.definition.comment.tsx
2494+ single-line-comment-consuming-line-ending:
2495+ - match: '(^[ \t]+)?((//)(?:\s*((@)internal)(?=\s|$))?)'
2497+ 1: punctuation.whitespace.comment.leading.tsx
2498+ 2: comment.line.double-slash.tsx
2499+ 3: punctuation.definition.comment.tsx
2500+ 4: storage.type.internaldeclaration.tsx
2501+ 5: punctuation.decorator.internaldeclaration.tsx
2503+ - meta_content_scope: comment.line.double-slash.tsx
2233 statements:
2506 statements:
2235− - include: template
2237 - include: declaration
2507 - include: declaration
2238 - include: control-statement
2508 - include: control-statement
2239 - include: after-operator-block-as-object-literal
2509 - include: after-operator-block-as-object-literal
@@ -2241,21 +2511,31 @@ contexts:
2241 - include: label
2511 - include: label
2242 - include: expression
2512 - include: expression
2243 - include: punctuation-semicolon
2513 - include: punctuation-semicolon
2245 - include: qstring-single
2517 - include: qstring-single
2246 - include: qstring-double
2518 - include: qstring-double
2519+ - include: template
2247 string-character-escape:
2520 string-character-escape:
2248− - match: '\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)'
2521+ - 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]?|.|$)'
2249 scope: constant.character.escape.tsx
2522 scope: constant.character.escape.tsx
2250 super-literal:
2523 super-literal:
2251 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))super\b(?!\$)'
2524 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))super\b(?!\$)'
2252 scope: variable.language.super.tsx
2525 scope: variable.language.super.tsx
2526+ support-function-call-identifiers:
2528+ - include: support-objects
2529+ - include: object-identifiers
2530+ - include: punctuation-accessor
2531+ - match: '(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))import(?=\s*[\(]\s*[\"\''\`]))'
2532+ scope: keyword.operator.expression.import.tsx
2253 support-objects:
2533 support-objects:
2254 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(arguments)\b(?!\$)'
2534 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(arguments)\b(?!\$)'
2255 scope: variable.language.arguments.tsx
2535 scope: variable.language.arguments.tsx
2256 - match: |-
2536 - match: |-
2257− (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(Array|ArrayBuffer|Atomics|Boolean|DataView|Date|Float32Array|Float64Array|Function|Generator
2537+ (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(Array|ArrayBuffer|Atomics|BigInt|BigInt64Array|BigUint64Array|Boolean|DataView|Date|Float32Array
2258− |GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Proxy
2538+ |Float64Array|Function|Generator|GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Proxy
2259 |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray
2539 |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray
2260 |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\b(?!\$)
2540 |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\b(?!\$)
2261 scope: support.class.builtin.tsx
2541 scope: support.class.builtin.tsx
@@ -2309,9 +2589,9 @@ contexts:
2309 4: support.variable.property.target.tsx
2589 4: support.variable.property.target.tsx
2310 - match: |-
2590 - match: |-
2311 (?x) (?:(\.)|(\?\.(?!\s*[[:digit:]]))) \s* (?:
2591 (?x) (?:(\.)|(\?\.(?!\s*[[:digit:]]))) \s* (?:
2312− (constructor|length|prototype|__proto__)
2592+ (?:(constructor|length|prototype|__proto__)\b(?!\$|\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?\())
2314− (EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY))\b(?!\$)
2594+ (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\b(?!\$)))
2315 captures:
2595 captures:
2316 1: punctuation.accessor.tsx
2596 1: punctuation.accessor.tsx
2317 2: punctuation.accessor.optional.tsx
2597 2: punctuation.accessor.optional.tsx
@@ -2415,7 +2695,7 @@ contexts:
2415 |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary
2695 |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary
2416 |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead
2696 |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead
2417 |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile
2697 |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile
2418− |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\b(?!\$|\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?\()
2698+ |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\b(?!\$|\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?\()
2419 captures:
2699 captures:
2420 1: punctuation.accessor.tsx
2700 1: punctuation.accessor.tsx
2421 2: punctuation.accessor.optional.tsx
2701 2: punctuation.accessor.optional.tsx
@@ -2539,6 +2819,7 @@ contexts:
2539 captures:
2819 captures:
2540 0: punctuation.definition.block.tsx
2820 0: punctuation.definition.block.tsx
2541 pop: true
2821 pop: true
2542 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(switch)\s*(\()'
2823 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(switch)\s*(\()'
2543 captures:
2824 captures:
2544 1: keyword.control.switch.tsx
2825 1: keyword.control.switch.tsx
@@ -2581,7 +2862,34 @@ contexts:
2581 0: case-clause.expr.tsx punctuation.definition.section.case-statement.tsx
2862 0: case-clause.expr.tsx punctuation.definition.section.case-statement.tsx
2582 - include: statements
2863 - include: statements
2583 template:
2864 template:
2584− - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?=(<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?!=)\>)*(?!=)>\s*)`)'
2865+ - include: template-call
2866+ - match: "([_$[:alpha:]][_$[:alnum:]]*)?(`)"
2868+ 1: entity.name.function.tagged-template.tsx
2869+ 2: punctuation.definition.string.template.begin.tsx
2871+ - meta_scope: string.template.tsx
2874+ 0: punctuation.definition.string.template.end.tsx
2876+ - include: template-substitution-element
2877+ - include: string-character-escape
2879+ - 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*)?`)'
2881+ - meta_scope: string.template.tsx
2884+ - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*))'
2886+ - 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*)?`)'
2888+ - include: support-function-call-identifiers
2889+ - match: "([_$[:alpha:]][_$[:alnum:]]*)"
2890+ scope: entity.name.function.tagged-template.tsx
2891+ - include: type-arguments
2892+ - 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*)`)'
2585 captures:
2893 captures:
2586 1: entity.name.function.tagged-template.tsx
2894 1: entity.name.function.tagged-template.tsx
@@ -2589,6 +2897,20 @@ contexts:
2589 - match: (?=`)
2897 - match: (?=`)
2590 pop: true
2898 pop: true
2591 - include: type-arguments
2899 - include: type-arguments
2900+ template-substitution-element:
2903+ 0: punctuation.definition.template-expression.begin.tsx
2905+ - meta_scope: meta.template.expression.tsx
2906+ - meta_content_scope: meta.embedded.line.tsx
2909+ 0: punctuation.definition.template-expression.end.tsx
2911+ - include: expression
2913+ - include: template-call
2592 - match: "([_$[:alpha:]][_$[:alnum:]]*)?(`)"
2914 - match: "([_$[:alpha:]][_$[:alnum:]]*)?(`)"
2593 captures:
2915 captures:
2594 1: entity.name.function.tagged-template.tsx
2916 1: entity.name.function.tagged-template.tsx
@@ -2599,9 +2921,9 @@ contexts:
2599 captures:
2921 captures:
2600 0: punctuation.definition.string.template.end.tsx
2922 0: punctuation.definition.string.template.end.tsx
2601 pop: true
2923 pop: true
2602− - include: template-substitution-element
2924+ - include: template-type-substitution-element
2603 - include: string-character-escape
2925 - include: string-character-escape
2604− template-substitution-element:
2926+ template-type-substitution-element:
2605 - match: '\$\{'
2927 - match: '\$\{'
2606 captures:
2928 captures:
2607 0: punctuation.definition.template-expression.begin.tsx
2929 0: punctuation.definition.template-expression.begin.tsx
@@ -2612,9 +2934,9 @@ contexts:
2612 captures:
2934 captures:
2613 0: punctuation.definition.template-expression.end.tsx
2935 0: punctuation.definition.template-expression.end.tsx
2614 pop: true
2936 pop: true
2615− - include: expression
2937+ - include: type
2616 ternary-expression:
2938 ternary-expression:
2617− - match: '(?!\?\.\s*[^[:digit:]])(\?)'
2939+ - match: '(?!\?\.\s*[^[:digit:]])(\?)(?!\?)'
2618 captures:
2940 captures:
2619 1: keyword.operator.ternary.tsx
2941 1: keyword.operator.ternary.tsx
@@ -2628,7 +2950,7 @@ contexts:
2628 scope: variable.language.this.tsx
2950 scope: variable.language.this.tsx
2630 - include: comment
2952 - include: comment
2631− - include: string
2953+ - include: type-string
2632 - include: numeric-literal
2954 - include: numeric-literal
2633 - include: type-primitive
2955 - include: type-primitive
2634 - include: type-builtin-literals
2956 - include: type-builtin-literals
@@ -2640,24 +2962,36 @@ contexts:
2640 - include: type-fn-type-parameters
2962 - include: type-fn-type-parameters
2641 - include: type-paren-or-function-parameters
2963 - include: type-paren-or-function-parameters
2642 - include: type-function-return-type
2964 - include: type-function-return-type
2965+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(readonly)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*'
2967+ 1: storage.modifier.tsx
2643 - include: type-name
2968 - include: type-name
2644 type-alias-declaration:
2969 type-alias-declaration:
2645− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(type)\b\s+([_$[:alpha:]][_$[:alnum:]]*)\s*'
2970+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(type)\b\s+([_$[:alpha:]][_$[:alnum:]]*)\s*'
2646 captures:
2971 captures:
2647 1: keyword.control.export.tsx
2972 1: keyword.control.export.tsx
2648− 2: storage.type.type.tsx
2973+ 2: storage.modifier.tsx
2649− 3: entity.name.type.alias.tsx
2974+ 3: storage.type.type.tsx
2975+ 4: entity.name.type.alias.tsx
2651 - meta_scope: meta.type.declaration.tsx
2977 - meta_scope: meta.type.declaration.tsx
2652− - match: '(?=\}|;|^\s*abstract\b|^\s*async\b|^\s*class\b|^\s*const\b|^\s*declare\b|^\s*enum\b|^\s*export\b|^\s*function\b|^\s*import\b|^\s*interface\b|^\s*let\b|^\s*module\b|^\s*namespace\b|^\s*return\b|^\s*type\b|^\s*var\b)'
2978+ - match: '(?=\}|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
2653 pop: true
2979 pop: true
2654 - include: comment
2980 - include: comment
2655 - include: type-parameters
2981 - include: type-parameters
2982+ - match: '(=)\s*(intrinsic)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2984+ 1: keyword.operator.assignment.tsx
2985+ 2: keyword.control.intrinsic.tsx
2987+ - match: '(?=\}|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
2656 - match: (=)\s*
2990 - match: (=)\s*
2657 captures:
2991 captures:
2658 1: keyword.operator.assignment.tsx
2992 1: keyword.operator.assignment.tsx
2660− - match: '(?=\}|;|^\s*abstract\b|^\s*async\b|^\s*class\b|^\s*const\b|^\s*declare\b|^\s*enum\b|^\s*export\b|^\s*function\b|^\s*import\b|^\s*interface\b|^\s*let\b|^\s*module\b|^\s*namespace\b|^\s*return\b|^\s*type\b|^\s*var\b)'
2994+ - match: '(?=\}|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
2661 pop: true
2995 pop: true
2662 - include: type
2996 - include: type
2663 type-annotation:
2997 type-annotation:
@@ -2687,8 +3021,13 @@ contexts:
2687 captures:
3021 captures:
2688 0: punctuation.definition.typeparameters.end.tsx
3022 0: punctuation.definition.typeparameters.end.tsx
2689 pop: true
3023 pop: true
2690− - include: type
3024+ - include: type-arguments-body
2691− - include: punctuation-comma
3025+ type-arguments-body:
3026+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(_)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3028+ 0: keyword.operator.type.tsx
3030+ - include: punctuation-comma
2692 type-builtin-literals:
3031 type-builtin-literals:
2693 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(this|true|false|undefined|null|object)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3032 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(this|true|false|undefined|null|object)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2694 scope: support.type.builtin.tsx
3033 scope: support.type.builtin.tsx
@@ -2710,13 +3049,19 @@ contexts:
2710 - include: type
3049 - include: type
2711 - include: type
3050 - include: type
2712 type-fn-type-parameters:
3051 type-fn-type-parameters:
2713− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(new)\b(?=\s*\<)'
3052+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(abstract)\s+)?(new)\b(?=\s*\<)'
2714− scope: meta.type.constructor.tsx
2715 captures:
3053 captures:
2716− 1: keyword.control.new.tsx
3054+ 1: meta.type.constructor.tsx storage.modifier.tsx
2717− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(new)\b\s*(?=\()'
3055+ 2: meta.type.constructor.tsx keyword.control.new.tsx
3060+ - include: type-parameters
3061+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(abstract)\s+)?(new)\b\s*(?=\()'
2718 captures:
3062 captures:
2719− 1: keyword.control.new.tsx
3063+ 1: storage.modifier.tsx
3064+ 2: keyword.control.new.tsx
2721 - meta_scope: meta.type.constructor.tsx
3066 - meta_scope: meta.type.constructor.tsx
2722 - match: (?<=\))
3067 - match: (?<=\))
@@ -2767,6 +3112,30 @@ contexts:
2767 - include: type-predicate-operator
3112 - include: type-predicate-operator
2768 - include: type
3113 - include: type
2769 type-name:
3114 type-name:
3115+ - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(<)'
3117+ 1: entity.name.type.module.tsx
3118+ 2: punctuation.accessor.tsx
3119+ 3: punctuation.accessor.optional.tsx
3120+ 4: meta.type.parameters.tsx punctuation.definition.typeparameters.begin.tsx
3122+ - meta_content_scope: meta.type.parameters.tsx
3125+ 1: meta.type.parameters.tsx punctuation.definition.typeparameters.end.tsx
3127+ - include: type-arguments-body
3128+ - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(<)'
3130+ 1: entity.name.type.tsx
3131+ 2: meta.type.parameters.tsx punctuation.definition.typeparameters.begin.tsx
3133+ - meta_content_scope: meta.type.parameters.tsx
3136+ 1: meta.type.parameters.tsx punctuation.definition.typeparameters.end.tsx
3138+ - include: type-arguments-body
2770 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))'
3139 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))'
2771 captures:
3140 captures:
2772 1: entity.name.type.module.tsx
3141 1: entity.name.type.module.tsx
@@ -2802,18 +3171,16 @@ contexts:
2802 - include: type
3171 - include: type
2803 type-operators:
3172 type-operators:
2804 - include: typeof-operator
3173 - include: typeof-operator
2805− - match: '(?:([&|])|(=(?!>)))(?=\s*\{)'
3174+ - match: '([&|])(?=\s*\{)'
2806 captures:
3175 captures:
2807− 1: keyword.operator.type.tsx
3176+ 0: keyword.operator.type.tsx
2808− 2: keyword.operator.assignment.tsx
2810 - match: '(?<=\})'
3178 - match: '(?<=\})'
2811 pop: true
3179 pop: true
2812 - include: type-object
3180 - include: type-object
2813− - match: "([&|])|(=(?!>))"
3181+ - match: "[&|]"
2814 captures:
3182 captures:
2815− 1: keyword.operator.type.tsx
3183+ 0: keyword.operator.type.tsx
2816− 2: keyword.operator.assignment.tsx
2818 - match: (?=\S)
3185 - match: (?=\S)
2819 pop: true
3186 pop: true
@@ -2840,6 +3207,8 @@ contexts:
2840 scope: storage.modifier.tsx
3207 scope: storage.modifier.tsx
2841 - include: type
3208 - include: type
2842 - include: punctuation-comma
3209 - include: punctuation-comma
3211+ scope: keyword.operator.assignment.tsx
2843 type-paren-or-function-parameters:
3212 type-paren-or-function-parameters:
2844 - match: \(
3213 - match: \(
2845 captures:
3214 captures:
@@ -2850,7 +3219,6 @@ contexts:
2850 captures:
3219 captures:
2851 0: meta.brace.round.tsx
3220 0: meta.brace.round.tsx
2852 pop: true
3221 pop: true
2853− - include: destructuring-parameter
2854 - match: |-
3222 - match: |-
2855 (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\s*(\??)(?=\s*(:\s*(
3223 (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\s*(\??)(?=\s*(:\s*(
@@ -2863,7 +3231,8 @@ contexts:
2866− (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$))))
3234+ (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
3235+ (:\s*((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))))
2867 captures:
3236 captures:
2868 1: storage.modifier.tsx
3237 1: storage.modifier.tsx
2869 2: keyword.operator.rest.tsx
3238 2: keyword.operator.rest.tsx
@@ -2882,11 +3251,28 @@ contexts:
2882 scope: punctuation.separator.parameter.tsx
3251 scope: punctuation.separator.parameter.tsx
2883 - include: type
3252 - include: type
2884 type-predicate-operator:
3253 type-predicate-operator:
3254+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(asserts)\s+)?(?!asserts)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\s(is)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3256+ 1: keyword.operator.type.asserts.tsx
3257+ 2: variable.parameter.tsx variable.language.this.tsx
3258+ 3: variable.parameter.tsx
3259+ 4: keyword.operator.expression.is.tsx
3260+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(asserts)\s+(?!is)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3262+ 1: keyword.operator.type.asserts.tsx
3263+ 2: variable.parameter.tsx variable.language.this.tsx
3264+ 3: variable.parameter.tsx
3265+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))asserts(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3266+ scope: keyword.operator.type.asserts.tsx
2885 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))is(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3267 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))is(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2886 scope: keyword.operator.expression.is.tsx
3268 scope: keyword.operator.expression.is.tsx
2887 type-primitive:
3269 type-primitive:
2888− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(string|number|boolean|symbol|any|void|never)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3270+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(string|number|bigint|boolean|symbol|any|void|never|unknown)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2889 scope: support.type.primitive.tsx
3271 scope: support.type.primitive.tsx
3273+ - include: qstring-single
3274+ - include: qstring-double
3275+ - include: template-type
2890 type-tuple:
3276 type-tuple:
2891 - match: '\['
3277 - match: '\['
2892 captures:
3278 captures:
@@ -2897,56 +3283,84 @@ contexts:
2897 captures:
3283 captures:
2898 0: meta.brace.square.tsx
3284 0: meta.brace.square.tsx
2899 pop: true
3285 pop: true
3287+ scope: keyword.operator.rest.tsx
3288+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))([_$[:alpha:]][_$[:alnum:]]*)\s*(\?)?\s*(:)'
3290+ 1: entity.name.label.tsx
3291+ 2: keyword.operator.optional.tsx
3292+ 3: punctuation.separator.label.tsx
2900 - include: type
3293 - include: type
2901 - include: punctuation-comma
3294 - include: punctuation-comma
2902 typeof-operator:
3295 typeof-operator:
2903 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))typeof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3296 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))typeof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2904− scope: keyword.operator.expression.typeof.tsx
3297+ captures:
3298+ 0: keyword.operator.expression.typeof.tsx
3300+ - match: '(?=[,);}\]=>:&|{\?]|$|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
3302+ - include: expression
2905 undefined-literal:
3303 undefined-literal:
2906 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))undefined(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3304 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))undefined(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2907 scope: constant.language.undefined.tsx
3305 scope: constant.language.undefined.tsx
2908 var-expr:
3306 var-expr:
2909− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3307+ - match: '(?=(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))'
2911− 1: keyword.control.export.tsx
2912− 2: storage.type.tsx
2914 - meta_scope: meta.var.expr.tsx
3309 - meta_scope: meta.var.expr.tsx
2915− - match: '((?=;|}|(\s+(of|in)\s+)|^\s*$|;|^\s*abstract\b|^\s*async\b|^\s*class\b|^\s*const\b|^\s*declare\b|^\s*enum\b|^\s*export\b|^\s*function\b|^\s*import\b|^\s*interface\b|^\s*let\b|^\s*module\b|^\s*namespace\b|^\s*return\b|^\s*type\b|^\s*var\b)|((?<=\S)(?<!^let|[^\._$[:alnum:]]let|^var|[^\._$[:alnum:]]var)(?=\s*$)))'
3310+ - 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*$)))'
2916 pop: true
3311 pop: true
3312+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*'
3314+ 1: keyword.control.export.tsx
3315+ 2: storage.modifier.tsx
3316+ 3: storage.type.tsx
2917 - include: destructuring-variable
3320 - include: destructuring-variable
2918 - include: var-single-variable
3321 - include: var-single-variable
2919 - include: variable-initializer
3322 - include: variable-initializer
2920 - include: comment
3323 - include: comment
2921− - match: (,)\s*(?!\S)
3324+ - match: (,)\s*((?!\S)|(?=\/\/))
2922 captures:
3325 captures:
2923 1: punctuation.separator.comma.tsx
3326 1: punctuation.separator.comma.tsx
2925− - match: '(?<!,)(((?==|;|}|(\s+(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))'
3328+ - match: '(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))'
2926 pop: true
3329 pop: true
3330+ - include: single-line-comment-consuming-line-ending
2927 - include: comment
3331 - include: comment
2928 - include: destructuring-variable
3332 - include: destructuring-variable
2929 - include: var-single-variable
3333 - include: var-single-variable
2930 - include: punctuation-comma
3334 - include: punctuation-comma
2931 - include: punctuation-comma
3335 - include: punctuation-comma
2932− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3336+ - match: '(?=(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))'
2933 captures:
3337 captures:
2934 1: keyword.control.export.tsx
3338 1: keyword.control.export.tsx
2935− 2: storage.type.tsx
3339+ 2: storage.modifier.tsx
3340+ 3: storage.type.tsx
2937 - meta_scope: meta.var.expr.tsx
3342 - meta_scope: meta.var.expr.tsx
2938− - match: '((?=;|}|(\s+(of|in)\s+)|^\s*$|;|^\s*abstract\b|^\s*async\b|^\s*class\b|^\s*const\b|^\s*declare\b|^\s*enum\b|^\s*export\b|^\s*function\b|^\s*import\b|^\s*interface\b|^\s*let\b|^\s*module\b|^\s*namespace\b|^\s*return\b|^\s*type\b|^\s*var\b)|((?<=\S)(?<!^const|[^\._$[:alnum:]]const)(?=\s*$)))'
3343+ - 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*$)))'
2939 pop: true
3344 pop: true
3345+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*'
3347+ 1: keyword.control.export.tsx
3348+ 2: storage.modifier.tsx
3349+ 3: storage.type.tsx
2940 - include: destructuring-const
3353 - include: destructuring-const
2941 - include: var-single-const
3354 - include: var-single-const
2942 - include: variable-initializer
3355 - include: variable-initializer
2943 - include: comment
3356 - include: comment
2944− - match: (,)\s*(?!\S)
3357+ - match: (,)\s*((?!\S)|(?=\/\/))
2945 captures:
3358 captures:
2946 1: punctuation.separator.comma.tsx
3359 1: punctuation.separator.comma.tsx
2948− - match: '(?<!,)(((?==|;|}|(\s+(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))'
3361+ - match: '(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))'
2949 pop: true
3362 pop: true
3363+ - include: single-line-comment-consuming-line-ending
2950 - include: comment
3364 - include: comment
2951 - include: destructuring-const
3365 - include: destructuring-const
2952 - include: var-single-const
3366 - include: var-single-const
@@ -2963,11 +3377,11 @@ contexts:
2963 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3377 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
2965 ((async\s*)?(
3379 ((async\s*)?(
2966− ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
3380+ ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
2967 # sure shot arrow functions even if => is on new line
3381 # sure shot arrow functions even if => is on new line
2969− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
3383+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
2970− [(]\s*
3384+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
2972 ([)]\s*:) | # ():
3386 ([)]\s*:) | # ():
2973 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
3387 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -2978,9 +3392,9 @@ contexts:
2979 # arrow function possible to detect only with => on same line
3393 # arrow function possible to detect only with => on same line
2981− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
3395+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
2982− \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
3396+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
2983− (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
3397+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
2984 \s*=> # arrow operator
3398 \s*=> # arrow operator
@@ -2997,19 +3411,20 @@ contexts:
3000− (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$))) |
3414+ (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
3001− (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
3415+ (:\s*((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
3416+ (:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
3002 ((async\s+)?(
3417 ((async\s+)?(
3003 (function\s*[(<*]) |
3418 (function\s*[(<*]) |
3004 (function\s+) |
3419 (function\s+) |
3005 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3420 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3007 ((async\s*)?(
3422 ((async\s*)?(
3008− ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
3423+ ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
3009 # sure shot arrow functions even if => is on new line
3424 # sure shot arrow functions even if => is on new line
3011− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
3426+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
3012− [(]\s*
3427+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
3014 ([)]\s*:) | # ():
3429 ([)]\s*:) | # ():
3015 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
3430 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -3020,9 +3435,9 @@ contexts:
3021 # arrow function possible to detect only with => on same line
3436 # arrow function possible to detect only with => on same line
3023− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
3438+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
3024− \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
3439+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
3025− (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
3440+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
3026 \s*=> # arrow operator
3441 \s*=> # arrow operator
@@ -3031,7 +3446,7 @@ contexts:
3031 1: meta.definition.variable.tsx variable.other.constant.tsx entity.name.function.tsx
3446 1: meta.definition.variable.tsx variable.other.constant.tsx entity.name.function.tsx
3033 - meta_scope: meta.var-single-variable.expr.tsx
3448 - meta_scope: meta.var-single-variable.expr.tsx
3034− - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
3449+ - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
3035 pop: true
3450 pop: true
3036 - include: var-single-variable-type-annotation
3451 - include: var-single-variable-type-annotation
3037 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
3452 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
@@ -3039,12 +3454,12 @@ contexts:
3039 1: meta.definition.variable.tsx variable.other.constant.tsx
3454 1: meta.definition.variable.tsx variable.other.constant.tsx
3041 - meta_scope: meta.var-single-variable.expr.tsx
3456 - meta_scope: meta.var-single-variable.expr.tsx
3042− - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
3457+ - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
3043 pop: true
3458 pop: true
3044 - include: var-single-variable-type-annotation
3459 - include: var-single-variable-type-annotation
3045 var-single-variable:
3460 var-single-variable:
3046 - match: |-
3461 - match: |-
3047− (?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\s*
3462+ (?x)([_$[:alpha:]][_$[:alnum:]]*)(\!)?(?=\s*
3048 # function assignment |
3463 # function assignment |
3050 ((async\s+)?(
3465 ((async\s+)?(
@@ -3053,11 +3468,11 @@ contexts:
3053 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3468 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3055 ((async\s*)?(
3470 ((async\s*)?(
3056− ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
3471+ ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
3057 # sure shot arrow functions even if => is on new line
3472 # sure shot arrow functions even if => is on new line
3059− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
3474+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
3060− [(]\s*
3475+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
3062 ([)]\s*:) | # ():
3477 ([)]\s*:) | # ():
3063 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
3478 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -3068,9 +3483,9 @@ contexts:
3069 # arrow function possible to detect only with => on same line
3484 # arrow function possible to detect only with => on same line
3071− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
3486+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
3072− \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
3487+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
3073− (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
3488+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
3074 \s*=> # arrow operator
3489 \s*=> # arrow operator
@@ -3087,19 +3502,20 @@ contexts:
3090− (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$))) |
3505+ (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
3091− (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
3506+ (:\s*((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
3507+ (:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
3092 ((async\s+)?(
3508 ((async\s+)?(
3093 (function\s*[(<*]) |
3509 (function\s*[(<*]) |
3094 (function\s+) |
3510 (function\s+) |
3095 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3511 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3097 ((async\s*)?(
3513 ((async\s*)?(
3098− ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
3514+ ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
3099 # sure shot arrow functions even if => is on new line
3515 # sure shot arrow functions even if => is on new line
3101− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
3517+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
3102− [(]\s*
3518+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
3104 ([)]\s*:) | # ():
3520 ([)]\s*:) | # ():
3105 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
3521 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -3110,34 +3526,37 @@ contexts:
3111 # arrow function possible to detect only with => on same line
3527 # arrow function possible to detect only with => on same line
3113− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
3529+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
3114− \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
3530+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
3115− (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
3531+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
3116 \s*=> # arrow operator
3532 \s*=> # arrow operator
3120 captures:
3536 captures:
3121 1: meta.definition.variable.tsx entity.name.function.tsx
3537 1: meta.definition.variable.tsx entity.name.function.tsx
3538+ 2: keyword.operator.definiteassignment.tsx
3123 - meta_scope: meta.var-single-variable.expr.tsx
3540 - meta_scope: meta.var-single-variable.expr.tsx
3124− - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
3541+ - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
3125 pop: true
3542 pop: true
3126 - include: var-single-variable-type-annotation
3543 - include: var-single-variable-type-annotation
3127− - match: "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
3544+ - match: '([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])(\!)?'
3128 captures:
3545 captures:
3129 1: meta.definition.variable.tsx variable.other.constant.tsx
3546 1: meta.definition.variable.tsx variable.other.constant.tsx
3547+ 2: keyword.operator.definiteassignment.tsx
3131 - meta_scope: meta.var-single-variable.expr.tsx
3549 - meta_scope: meta.var-single-variable.expr.tsx
3132− - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
3550+ - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
3133 pop: true
3551 pop: true
3134 - include: var-single-variable-type-annotation
3552 - include: var-single-variable-type-annotation
3135− - match: "([_$[:alpha:]][_$[:alnum:]]*)"
3553+ - match: '([_$[:alpha:]][_$[:alnum:]]*)(\!)?'
3136 captures:
3554 captures:
3137 1: meta.definition.variable.tsx variable.other.readwrite.tsx
3555 1: meta.definition.variable.tsx variable.other.readwrite.tsx
3556+ 2: keyword.operator.definiteassignment.tsx
3139 - meta_scope: meta.var-single-variable.expr.tsx
3558 - meta_scope: meta.var-single-variable.expr.tsx
3140− - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
3559+ - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
3141 pop: true
3560 pop: true
3142 - include: var-single-variable-type-annotation
3561 - include: var-single-variable-type-annotation
3143 var-single-variable-type-annotation:
3562 var-single-variable-type-annotation:
@@ -3145,17 +3564,17 @@ contexts:
3145 - include: string
3564 - include: string
3146 - include: comment
3565 - include: comment
3147 variable-initializer:
3566 variable-initializer:
3148− - match: (?<!=|!)(=)(?!=)(?=\s*\S)
3567+ - match: (?<!=|!)(=)(?!=)(?=\s*\S)(?!\s*.*=>\s*$)
3149 captures:
3568 captures:
3150 1: keyword.operator.assignment.tsx
3569 1: keyword.operator.assignment.tsx
3152− - match: '(?=$|^|[,);}\]])'
3571+ - match: '(?=$|^|[,);}\]]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
3153 pop: true
3572 pop: true
3154 - include: expression
3573 - include: expression
3155 - match: (?<!=|!)(=)(?!=)
3574 - match: (?<!=|!)(=)(?!=)
3156 captures:
3575 captures:
3157 1: keyword.operator.assignment.tsx
3576 1: keyword.operator.assignment.tsx
3159− - match: '(?=[,);}\]])|(?=^\s*$)|(?<=\S)(?<!=)(?=\s*$)'
3578+ - match: '(?=[,);}\]]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))|(?=^\s*$)|(?<=\S)(?<!=)(?=\s*$)'
3160 pop: true
3579 pop: true
3161 - include: expression
3580 - include: expression