@@ -9,7 +9,10 @@ contexts:
10 - include: directives
10 - include: directives
11 - include: statements
11 - include: statements
12− - include: shebang
12+ - match: \A(#!).*(?=$)
13+ scope: comment.line.shebang.ts
15+ 1: punctuation.definition.comment.ts
14 - match: /\*\*(?!/)
17 - match: /\*\*(?!/)
@@ -41,10 +44,10 @@ contexts:
41 5: punctuation.decorator.internaldeclaration.tsx
44 5: punctuation.decorator.internaldeclaration.tsx
43 - meta_content_scope: comment.line.double-slash.tsx
46 - meta_content_scope: comment.line.double-slash.tsx
44− - match: (?=$)
47+ - match: (?=^)
46 access-modifier:
49 access-modifier:
47− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(abstract|declare|override|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
50+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(abstract|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
48 scope: storage.modifier.tsx
51 scope: storage.modifier.tsx
49 after-operator-block-as-object-literal:
52 after-operator-block-as-object-literal:
50 - match: '(?<!\+\+|--)(?<=[:=(,\[?+!>]|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^yield|[^\._$[:alnum:]]yield|^throw|[^\._$[:alnum:]]throw|^in|[^\._$[:alnum:]]in|^of|[^\._$[:alnum:]]of|^typeof|[^\._$[:alnum:]]typeof|&&|\|\||\*)\s*(\{)'
53 - match: '(?<!\+\+|--)(?<=[:=(,\[?+!>]|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^yield|[^\._$[:alnum:]]yield|^throw|[^\._$[:alnum:]]throw|^in|[^\._$[:alnum:]]in|^of|[^\._$[:alnum:]]of|^typeof|[^\._$[:alnum:]]typeof|&&|\|\||\*)\s*(\{)'
@@ -106,8 +109,8 @@ contexts:
107 # sure shot arrow functions even if => is on new line
110 # sure shot arrow functions even if => is on new line
109− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
112+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
110− [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
113+ [(]\s*
112 ([)]\s*:) | # ():
115 ([)]\s*:) | # ():
113 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
116 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -118,9 +121,9 @@ contexts:
119 # arrow function possible to detect only with => on same line
122 # arrow function possible to detect only with => on same line
121− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
124+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
122− \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
125+ \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
123− (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
126+ (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
124 \s*=> # arrow operator
127 \s*=> # arrow operator
@@ -135,15 +138,13 @@ contexts:
135 - include: type-parameters
138 - include: type-parameters
136 - include: function-parameters
139 - include: function-parameters
137 - include: arrow-return-type
140 - include: arrow-return-type
138− - include: possibly-arrow-return-type
139 - match: "=>"
141 - match: "=>"
140 captures:
142 captures:
141 0: storage.type.function.arrow.tsx
143 0: storage.type.function.arrow.tsx
143 - meta_scope: meta.arrow.tsx
145 - meta_scope: meta.arrow.tsx
144− - match: '((?<=\}|\S)(?<!=>)|((?!\{)(?=\S)))(?!\/[\/\*])'
146+ - match: '(?<=\}|\S)(?<!=>)|((?!\{)(?=\S))'
145 pop: true
147 pop: true
146− - include: single-line-comment-consuming-line-ending
147 - include: decl-block
148 - include: decl-block
148 - include: expression
149 - include: expression
149 arrow-return-type:
150 arrow-return-type:
@@ -169,8 +170,6 @@ contexts:
169 binding-element:
170 binding-element:
170 - include: comment
171 - include: comment
171 - include: string
172 - include: string
172− - include: numeric-literal
174 - include: object-binding-pattern
173 - include: object-binding-pattern
175 - include: array-binding-pattern
174 - include: array-binding-pattern
176 - include: destructuring-variable-rest
175 - include: destructuring-variable-rest
@@ -178,8 +177,6 @@ contexts:
178 binding-element-const:
177 binding-element-const:
179 - include: comment
178 - include: comment
180 - include: string
179 - include: string
181− - include: numeric-literal
183 - include: object-binding-pattern-const
180 - include: object-binding-pattern-const
184 - include: array-binding-pattern-const
181 - include: array-binding-pattern-const
185 - include: destructuring-variable-rest-const
182 - include: destructuring-variable-rest-const
@@ -203,12 +200,11 @@ contexts:
204 - include: jsx
201 - include: jsx
205 class-declaration:
202 class-declaration:
206− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(?:(abstract)\s+)?\b(class)\b(?=\s+|/[/*])'
203+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(export)\s+)?\b(?:(abstract)\s+)?\b(class)\b(?=\s+|/[/*])'
207 captures:
204 captures:
208 1: keyword.control.export.tsx
205 1: keyword.control.export.tsx
209 2: storage.modifier.tsx
206 2: storage.modifier.tsx
210− 3: storage.modifier.tsx
207+ 3: storage.type.class.tsx
211− 4: storage.type.class.tsx
213 - meta_scope: meta.class.tsx
209 - meta_scope: meta.class.tsx
214 - match: '(?<=\})'
210 - match: '(?<=\})'
@@ -223,10 +219,9 @@ contexts:
223 - include: type-parameters
219 - include: type-parameters
224 - include: class-or-interface-body
220 - include: class-or-interface-body
225 class-expression:
221 class-expression:
226− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(abstract)\s+)?(class)\b(?=\s+|[<{]|\/[\/*])'
222+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(class)\b(?=\s+|[<{]|\/[\/*])'
227 captures:
223 captures:
228− 1: storage.modifier.tsx
224+ 1: storage.type.class.tsx
229− 2: storage.type.class.tsx
231 - meta_scope: meta.class.tsx
226 - meta_scope: meta.class.tsx
232 - match: '(?<=\})'
227 - match: '(?<=\})'
@@ -243,11 +238,6 @@ contexts:
243 pop: true
238 pop: true
244 - include: comment
239 - include: comment
245 - include: decorator
240 - 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
251 - include: method-declaration
241 - include: method-declaration
252 - include: indexer-declaration
242 - include: indexer-declaration
253 - include: field-declaration
243 - include: field-declaration
@@ -294,15 +284,9 @@ contexts:
294 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(break|continue|do|goto|while)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
284 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(break|continue|do|goto|while)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
295 scope: keyword.control.loop.tsx
285 scope: keyword.control.loop.tsx
296 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(return)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
286 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(return)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
297− captures:
287+ scope: keyword.control.flow.tsx
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
303 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(case|default|switch)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
288 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(case|default|switch)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
304 scope: keyword.control.switch.tsx
289 scope: keyword.control.switch.tsx
305− - include: if-statement
306 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(else|if)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
290 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(else|if)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
307 scope: keyword.control.conditional.tsx
291 scope: keyword.control.conditional.tsx
308 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(with)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
292 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(with)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
@@ -311,6 +295,8 @@ contexts:
311 scope: keyword.control.tsx
295 scope: keyword.control.tsx
312 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(debugger)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
296 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(debugger)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
313 scope: keyword.other.debugger.tsx
297 scope: keyword.other.debugger.tsx
298+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(declare)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
299+ scope: storage.modifier.tsx
314 decl-block:
300 decl-block:
315 - match: '\{'
301 - match: '\{'
316 captures:
302 captures:
@@ -334,8 +320,6 @@ contexts:
334 - include: import-equals-declaration
320 - include: import-equals-declaration
335 - include: import-declaration
321 - include: import-declaration
336 - include: export-declaration
322 - include: export-declaration
337− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(declare|export)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
338− scope: storage.modifier.tsx
339 decorator:
323 decorator:
340 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))\@'
324 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))\@'
341 captures:
325 captures:
@@ -349,7 +333,7 @@ contexts:
349 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\{)'
333 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\{)'
351 - meta_scope: meta.object-binding-pattern-variable.tsx
335 - meta_scope: meta.object-binding-pattern-variable.tsx
352− - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
336+ - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
353 pop: true
337 pop: true
354 - include: object-binding-pattern-const
338 - include: object-binding-pattern-const
355 - include: type-annotation
339 - include: type-annotation
@@ -357,16 +341,15 @@ contexts:
357 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\[)'
341 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\[)'
359 - meta_scope: meta.array-binding-pattern-variable.tsx
343 - meta_scope: meta.array-binding-pattern-variable.tsx
360− - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
344+ - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
361 pop: true
345 pop: true
362 - include: array-binding-pattern-const
346 - include: array-binding-pattern-const
363 - include: type-annotation
347 - include: type-annotation
364 - include: comment
348 - include: comment
365 destructuring-parameter:
349 destructuring-parameter:
366− - match: '(?<!=|:)\s*(?:(\.\.\.)\s*)?(\{)'
350+ - match: '(?<!=|:)\s*(\{)'
367 captures:
351 captures:
368− 1: keyword.operator.rest.tsx
352+ 1: punctuation.definition.binding-pattern.object.tsx
369− 2: punctuation.definition.binding-pattern.object.tsx
371 - meta_scope: meta.parameter.object-binding-pattern.tsx
354 - meta_scope: meta.parameter.object-binding-pattern.tsx
372 - match: '\}'
355 - match: '\}'
@@ -374,10 +357,9 @@ contexts:
374 0: punctuation.definition.binding-pattern.object.tsx
357 0: punctuation.definition.binding-pattern.object.tsx
375 pop: true
358 pop: true
376 - include: parameter-object-binding-element
359 - include: parameter-object-binding-element
377− - match: '(?<!=|:)\s*(?:(\.\.\.)\s*)?(\[)'
360+ - match: '(?<!=|:)\s*(\[)'
378 captures:
361 captures:
379− 1: keyword.operator.rest.tsx
362+ 1: punctuation.definition.binding-pattern.array.tsx
380− 2: punctuation.definition.binding-pattern.array.tsx
382 - meta_scope: meta.paramter.array-binding-pattern.tsx
364 - meta_scope: meta.paramter.array-binding-pattern.tsx
383 - match: '\]'
365 - match: '\]'
@@ -395,7 +377,7 @@ contexts:
395 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\{)'
377 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\{)'
397 - meta_scope: meta.object-binding-pattern-variable.tsx
379 - meta_scope: meta.object-binding-pattern-variable.tsx
398− - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
380+ - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
399 pop: true
381 pop: true
400 - include: object-binding-pattern
382 - include: object-binding-pattern
401 - include: type-annotation
383 - include: type-annotation
@@ -403,7 +385,7 @@ contexts:
403 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\[)'
385 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\[)'
405 - meta_scope: meta.array-binding-pattern-variable.tsx
387 - meta_scope: meta.array-binding-pattern-variable.tsx
406− - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
388+ - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
407 pop: true
389 pop: true
408 - include: array-binding-pattern
390 - include: array-binding-pattern
409 - include: type-annotation
391 - include: type-annotation
@@ -419,12 +401,12 @@ contexts:
419 1: keyword.operator.rest.tsx
401 1: keyword.operator.rest.tsx
420 2: meta.definition.variable.tsx variable.other.constant.tsx
402 2: meta.definition.variable.tsx variable.other.constant.tsx
421 directives:
403 directives:
422− - match: '^(///)\s*(?=<(reference|amd-dependency|amd-module)(\s+(path|types|no-default-lib|lib|name)\s*=\s*((\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)))+\s*/>\s*$)'
404+ - match: '^(///)\s*(?=<(reference|amd-dependency|amd-module)(\s+(path|types|no-default-lib|lib|name)\s*=\s*((\''([^\''\\]|\\\''|\\)*\'')|(\"([^\"\\]|\\\"|\\)*\")))+\s*/>\s*$)'
423 captures:
405 captures:
424 1: punctuation.definition.comment.tsx
406 1: punctuation.definition.comment.tsx
426 - meta_scope: comment.line.triple-slash.directive.tsx
408 - meta_scope: comment.line.triple-slash.directive.tsx
427− - match: (?=$)
409+ - match: (?=^)
428 pop: true
410 pop: true
429 - match: (<)(reference|amd-dependency|amd-module)
411 - match: (<)(reference|amd-dependency|amd-module)
430 captures:
412 captures:
@@ -686,18 +668,13 @@ contexts:
686 captures:
668 captures:
687 1: punctuation.definition.block.tag.jsdoc
669 1: punctuation.definition.block.tag.jsdoc
688 - include: inline-tags
670 - include: inline-tags
689− - match: '((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\s+)'
691− 1: storage.type.class.jsdoc
692− 2: punctuation.definition.block.tag.jsdoc
693 enum-declaration:
671 enum-declaration:
694− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?(?:\b(const)\s+)?\b(enum)\s+([_$[:alpha:]][_$[:alnum:]]*)'
672+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:\b(const)\s+)?\b(enum)\s+([_$[:alpha:]][_$[:alnum:]]*)'
695 captures:
673 captures:
696 1: keyword.control.export.tsx
674 1: keyword.control.export.tsx
697 2: storage.modifier.tsx
675 2: storage.modifier.tsx
698− 3: storage.modifier.tsx
676+ 3: storage.type.enum.tsx
699− 4: storage.type.enum.tsx
677+ 4: entity.name.type.enum.tsx
700− 5: entity.name.type.enum.tsx
702 - meta_scope: meta.enum.declaration.tsx
679 - meta_scope: meta.enum.declaration.tsx
703 - match: '(?<=\})'
680 - match: '(?<=\})'
@@ -720,7 +697,7 @@ contexts:
720 pop: true
697 pop: true
721 - include: comment
698 - include: comment
722 - include: variable-initializer
699 - include: variable-initializer
723− - match: '(?=((\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\])))'
700+ - match: '(?=((\''([^\''\\]|\\\''|\\)*\'')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\])))'
725 - match: '(?=,|\}|$)'
702 - match: '(?=,|\}|$)'
726 pop: true
703 pop: true
@@ -736,25 +713,22 @@ contexts:
736 2: keyword.control.as.tsx
713 2: keyword.control.as.tsx
737 3: storage.type.namespace.tsx
714 3: storage.type.namespace.tsx
738 4: entity.name.type.module.tsx
715 4: entity.name.type.module.tsx
739− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)(?:\s+(type))?(?:(?:\s*(=))|(?:\s+(default)(?=\s+)))'
716+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)(?:(?:\s*(=))|(?:\s+(default)(?=\s+)))'
740 captures:
717 captures:
741 1: keyword.control.export.tsx
718 1: keyword.control.export.tsx
742− 2: keyword.control.type.tsx
719+ 2: keyword.operator.assignment.tsx
743− 3: keyword.operator.assignment.tsx
720+ 3: keyword.control.default.tsx
744− 4: keyword.control.default.tsx
746 - meta_scope: meta.export.default.tsx
722 - meta_scope: meta.export.default.tsx
747− - match: (?=$|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))
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)
748 pop: true
724 pop: true
749− - include: interface-declaration
750 - include: expression
725 - include: expression
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)))'
726+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)(?!\s*:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
752 captures:
727 captures:
753− 1: keyword.control.export.tsx
728+ 0: keyword.control.export.tsx
754− 2: keyword.control.type.tsx
756 - meta_scope: meta.export.tsx
730 - meta_scope: meta.export.tsx
757− - match: (?=$|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))
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)
758 pop: true
732 pop: true
759 - include: import-export-declaration
733 - include: import-export-declaration
760 expression:
734 expression:
@@ -763,105 +737,7 @@ contexts:
763 - include: expressionPunctuations
737 - include: expressionPunctuations
764 expression-inside-possibly-arrow-parens:
738 expression-inside-possibly-arrow-parens:
765 - include: expressionWithoutIdentifiers
739 - include: expressionWithoutIdentifiers
766− - include: comment
740+ - include: function-parameters-body
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
865 - include: identifiers
741 - include: identifiers
866 - include: expressionPunctuations
742 - include: expressionPunctuations
867 expression-operators:
743 expression-operators:
@@ -893,15 +769,11 @@ contexts:
893 - include: typeof-operator
769 - include: typeof-operator
894 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))void(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
770 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))void(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
895 scope: keyword.operator.expression.void.tsx
771 scope: keyword.operator.expression.void.tsx
896− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+(const)(?=\s*($|[;,:})\]]))'
898− 1: keyword.control.as.tsx
899− 2: storage.modifier.tsx
900 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+'
772 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+'
901 captures:
773 captures:
902 1: keyword.control.as.tsx
774 1: keyword.control.as.tsx
904− - match: '(?=^|[;),}\]:?\-\+\>]|\|\||\&\&|\!\=\=|$|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+)|(\s+\<))'
776+ - match: '(?=$|^|[;,:})\]]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+))'
905 pop: true
777 pop: true
906 - include: type
778 - include: type
907 - match: \.\.\.
779 - match: \.\.\.
@@ -916,12 +788,7 @@ contexts:
916 scope: keyword.operator.comparison.tsx
788 scope: keyword.operator.comparison.tsx
917 - match: <=|>=|<>|<|>
789 - match: <=|>=|<>|<|>
918 scope: keyword.operator.relational.tsx
790 scope: keyword.operator.relational.tsx
919− - match: '(?<=[_$[:alnum:]])(\!)\s*(?:(/=)|(?:(/)(?![/*])))'
791+ - match: \!|&&|\|\|
921− 1: keyword.operator.logical.tsx
922− 2: keyword.operator.assignment.compound.tsx
923− 3: keyword.operator.arithmetic.tsx
924− - match: \!|&&|\|\||\?\?
925 scope: keyword.operator.logical.tsx
792 scope: keyword.operator.logical.tsx
926 - match: \&|~|\^|\|
793 - match: \&|~|\^|\|
927 scope: keyword.operator.bitwise.tsx
794 scope: keyword.operator.bitwise.tsx
@@ -933,18 +800,9 @@ contexts:
933 scope: keyword.operator.increment.tsx
800 scope: keyword.operator.increment.tsx
934 - match: '%|\*|/|-|\+'
801 - match: '%|\*|/|-|\+'
935 scope: keyword.operator.arithmetic.tsx
802 scope: keyword.operator.arithmetic.tsx
936− - match: '(?<=[_$[:alnum:])\]])\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)+(?:(/=)|(?:(/)(?![/*]))))'
803+ - match: '(?<=[_$[:alnum:])\]])\s*(/)(?![/*])'
938− - match: '(?:(/=)|(?:(/)(?!\*([^\*]|(\*[^\/]))*\*\/)))'
940− 1: keyword.operator.assignment.compound.tsx
941− 2: keyword.operator.arithmetic.tsx
944− - match: '(?<=[_$[:alnum:])\]])\s*(?:(/=)|(?:(/)(?![/*])))'
945 captures:
804 captures:
946− 1: keyword.operator.assignment.compound.tsx
805+ 1: keyword.operator.arithmetic.tsx
947− 2: keyword.operator.arithmetic.tsx
948 expressionPunctuations:
806 expressionPunctuations:
949 - include: punctuation-comma
807 - include: punctuation-comma
950 - include: punctuation-accessor
808 - include: punctuation-accessor
@@ -952,6 +810,7 @@ contexts:
952 - include: jsx
810 - include: jsx
953 - include: string
811 - include: string
954 - include: regex
812 - include: regex
955 - include: comment
814 - include: comment
956 - include: function-expression
815 - include: function-expression
957 - include: class-expression
816 - include: class-expression
@@ -969,123 +828,143 @@ contexts:
969 - include: paren-expression
828 - include: paren-expression
970 field-declaration:
829 field-declaration:
971 - match: |-
830 - match: |-
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(?!\$))|((?<!\$)(?:
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(?!\$))|((?<!\$)(?:
973− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
832+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
974− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
833+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
975− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
834+ (?:\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
835+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
977− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
836+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
978− (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
837+ (?:\b[0-9][0-9_]*(\.)\B)| # 1.
979− (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
838+ (?:\B(\.)[0-9][0-9_]*\b)| # .1
980− (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
839+ (?:\b[0-9][0-9_]*\b(?!\.)) # 1
981− )(?!\$))|(\#?[_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(?:(?:(\?)|(\!))\s*)?(=|:|;|,|\}|$))
840+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\?\s*)?(=|:))
982 captures:
841 captures:
983 1: storage.modifier.tsx
842 1: storage.modifier.tsx
985 - meta_scope: meta.field.declaration.tsx
844 - meta_scope: meta.field.declaration.tsx
986 - match: |-
845 - match: |-
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(?!\$))|((?<!\$)(?:
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(?!\$))|((?<!\$)(?:
988− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
847+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
989− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
848+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
990− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
849+ (?:\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
850+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
992− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
851+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
993− (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
852+ (?:\b[0-9][0-9_]*(\.)\B)| # 1.
994− (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
853+ (?:\B(\.)[0-9][0-9_]*\b)| # .1
995− (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
854+ (?:\b[0-9][0-9_]*\b(?!\.)) # 1
996− )(?!\$))|(\#?[_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(?:(?:(\?)|(\!))\s*)?(=|:|;|,|$))))|(?<=\})
855+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\?\s*)?(=|:))))|(?<=\})
997 pop: true
856 pop: true
998 - include: variable-initializer
857 - include: variable-initializer
999− - include: type-annotation
1001− - include: array-literal
1002− - include: numeric-literal
1004 - match: |-
858 - match: |-
1005− (?x)(\#?[_$[:alpha:]][_$[:alnum:]]*)(?:(\?)|(\!))?(?=\s*\s*
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(?!\$))|((?<!\$)(?:
1006− # function assignment |
860+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1007− (=\s*(
861+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1008− ((async\s+)?(
862+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1009− (function\s*[(<*]) |
863+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1010− (function\s+) |
864+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1011− ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
865+ (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1012− )) |
866+ (?:\B(\.)[0-9][0-9_]*\b)| # .1
1013− ((async\s*)?(
867+ (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1014− ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
868+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\?\s*)?(=|:))
1015− # sure shot arrow functions even if => is on new line
869+ push:
1017− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
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(?!\$))|((?<!\$)(?:
1018− [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
872+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1019− (
873+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1020− ([)]\s*:) | # ():
874+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1021− ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
875+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1022− )
876+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1023− ) |
877+ (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1024− (
878+ (?:\B(\.)[0-9][0-9_]*\b)| # .1
1025− [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
879+ (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1026− ) |
880+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\?\s*)?(=|:))))|(?<=\})
1027− # arrow function possible to detect only with => on same line
881+ pop: true
1028− (
882+ - include: type-annotation
1029− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
883+ - include: string
1030− \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
884+ - include: array-literal
1031− (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
885+ - include: numeric-literal
1032− \s*=> # arrow operator
886+ - include: comment
1034− ))
888+ (?x)([_$[:alpha:]][_$[:alnum:]]*)(\?)?(?=(\?\s*)?\s*
1035− )) |
889+ # function assignment |
1036− # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>
890+ (=\s*(
1037− (:\s*(
891+ ((async\s+)?(
1038− (<) |
892+ (function\s*[(<*]) |
1039− ([(]\s*(
893+ (function\s+) |
1040− ([)]) |
894+ ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1041− (\.\.\.) |
895+ )) |
1042− ([_$[:alnum:]]+\s*(
896+ ((async\s*)?(
1043− ([:,?=])|
897+ ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
1044− ([)]\s*=>)
898+ # sure shot arrow functions even if => is on new line
1046− ))
900+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
1048− (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
902+ (
1049− (:\s*((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
903+ ([)]\s*:) | # ():
1050− (:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
904+ ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
1051− ((async\s+)?(
905+ )
1052− (function\s*[(<*]) |
906+ ) |
1053− (function\s+) |
907+ (
1054− ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
908+ [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
1056− ((async\s*)?(
910+ # arrow function possible to detect only with => on same line
1057− ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
911+ (
1058− # sure shot arrow functions even if => is on new line
912+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
1059− (
913+ \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
1060− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
914+ (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
1061− [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
915+ \s*=> # arrow operator
1063− ([)]\s*:) | # ():
917+ ))
1064− ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
918+ )) |
1065− )
919+ # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>
1068− [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
922+ ([(]\s*(
1070− # arrow function possible to detect only with => on same line
924+ (\.\.\.) |
1071− (
925+ ([_$[:alnum:]]+\s*(
1072− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
926+ ([:,?=])|
1073− \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
927+ ([)]\s*=>)
1074− (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
928+ ))
1075− \s*=> # arrow operator
929+ ))
1077− ))
931+ (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$))) |
1078− )))
932+ (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
1079− captures:
933+ ((async\s+)?(
1080− 1: meta.definition.property.tsx entity.name.function.tsx
934+ (function\s*[(<*]) |
1081− 2: keyword.operator.optional.tsx
935+ (function\s+) |
1082− 3: keyword.operator.definiteassignment.tsx
936+ ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1083− - match: '\#?[_$[:alpha:]][_$[:alnum:]]*'
937+ )) |
1084− scope: meta.definition.property.tsx variable.object.property.tsx
938+ ((async\s*)?(
1085− - match: \?
939+ ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
1086− scope: keyword.operator.optional.tsx
940+ # sure shot arrow functions even if => is on new line
1088− scope: keyword.operator.definiteassignment.tsx
942+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
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
1089 for-loop:
968 for-loop:
1090 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))for(?=((\s+|(\s*\/\*([^\*]|(\*[^\/]))*\*\/\s*))await)?\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)?(\())'
969 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))for(?=((\s+|(\s*\/\*([^\*]|(\*[^\/]))*\*\/\s*))await)?\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)?(\())'
1091 captures:
970 captures:
@@ -1112,59 +991,43 @@ contexts:
1112 - include: type-parameters
991 - include: type-parameters
1113 - include: function-parameters
992 - include: function-parameters
1114 - include: return-type
993 - include: return-type
1115− - include: type-function-return-type
1116 - include: decl-block
994 - include: decl-block
1117 - match: \*
995 - match: \*
1118 scope: keyword.generator.asterisk.tsx
996 scope: keyword.generator.asterisk.tsx
1119 function-call:
997 function-call:
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*)?\())'
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*)?\()'
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*)?\())'
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*)?\()'
1123 pop: true
1001 pop: true
1124− - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))'
1002+ - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*))'
1126 - meta_scope: meta.function-call.tsx
1004 - meta_scope: meta.function-call.tsx
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*)?\())'
1005+ - match: '(?=\s*(\?\.\s*)?(<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?!=)\>)*(?!=)>\s*)?\()'
1128 pop: true
1006 pop: true
1129− - include: function-call-target
1007+ - include: literal
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
1130 - include: comment
1015 - include: comment
1131− - include: function-call-optionals
1016+ - match: \?\.
1017+ scope: meta.function-call.tsx punctuation.accessor.optional.tsx
1132 - include: type-arguments
1018 - include: type-arguments
1133 - include: paren-expression
1019 - 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
1156 function-declaration:
1020 function-declaration:
1157− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?(?:(async)\s+)?(function\b)(?:\s*(\*))?(?:(?:\s+|(?<=\*))([_$[:alpha:]][_$[:alnum:]]*))?\s*'
1021+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(export)\s+)?(?:(async)\s+)?(function\b)(?:\s*(\*))?(?:(?:\s+|(?<=\*))([_$[:alpha:]][_$[:alnum:]]*))?\s*'
1158 captures:
1022 captures:
1159 1: keyword.control.export.tsx
1023 1: keyword.control.export.tsx
1160− 2: storage.modifier.tsx
1024+ 2: storage.modifier.async.tsx
1161− 3: storage.modifier.async.tsx
1025+ 3: storage.type.function.tsx
1162− 4: storage.type.function.tsx
1026+ 4: keyword.generator.asterisk.tsx
1163− 5: keyword.generator.asterisk.tsx
1027+ 5: meta.definition.function.tsx entity.name.function.tsx
1164− 6: meta.definition.function.tsx entity.name.function.tsx
1166 - meta_scope: meta.function.tsx
1029 - meta_scope: meta.function.tsx
1167− - match: '(?=;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))|(?<=\})'
1030+ - match: '(?=$|^|;)|(?<=\})'
1168 pop: true
1031 pop: true
1169 - include: function-name
1032 - include: function-name
1170 - include: function-body
1033 - include: function-body
@@ -1177,10 +1040,9 @@ contexts:
1177 4: meta.definition.function.tsx entity.name.function.tsx
1040 4: meta.definition.function.tsx entity.name.function.tsx
1179 - meta_scope: meta.function.expression.tsx
1042 - meta_scope: meta.function.expression.tsx
1180− - match: '(?=;)|(?<=\})'
1043+ - match: '(?<=\})'
1181 pop: true
1044 pop: true
1182 - include: function-name
1045 - include: function-name
1183− - include: single-line-comment-consuming-line-ending
1184 - include: function-body
1046 - include: function-body
1185 function-name:
1047 function-name:
1186 - match: "[_$[:alpha:]][_$[:alnum:]]*"
1048 - match: "[_$[:alpha:]][_$[:alnum:]]*"
@@ -1198,11 +1060,10 @@ contexts:
1198 - include: function-parameters-body
1060 - include: function-parameters-body
1199 function-parameters-body:
1061 function-parameters-body:
1200 - include: comment
1062 - include: comment
1202 - include: decorator
1063 - include: decorator
1203 - include: destructuring-parameter
1064 - include: destructuring-parameter
1204 - include: parameter-name
1065 - include: parameter-name
1205− - include: parameter-type-annotation
1066+ - include: type-annotation
1206 - include: variable-initializer
1067 - include: variable-initializer
1207 - match: ","
1068 - match: ","
1208 scope: punctuation.separator.parameter.tsx
1069 scope: punctuation.separator.parameter.tsx
@@ -1216,11 +1077,11 @@ contexts:
1216 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1077 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1218 ((async\s*)?(
1079 ((async\s*)?(
1219− ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
1080+ ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
1220 # sure shot arrow functions even if => is on new line
1081 # sure shot arrow functions even if => is on new line
1222− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
1083+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
1223− [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
1084+ [(]\s*
1225 ([)]\s*:) | # ():
1086 ([)]\s*:) | # ():
1226 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
1087 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -1231,9 +1092,9 @@ contexts:
1232 # arrow function possible to detect only with => on same line
1093 # arrow function possible to detect only with => on same line
1234− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
1095+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
1235− \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
1096+ \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
1236− (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
1097+ (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
1237 \s*=> # arrow operator
1098 \s*=> # arrow operator
@@ -1242,12 +1103,12 @@ contexts:
1242 1: punctuation.accessor.tsx
1103 1: punctuation.accessor.tsx
1243 2: punctuation.accessor.optional.tsx
1104 2: punctuation.accessor.optional.tsx
1244 3: entity.name.function.tsx
1105 3: entity.name.function.tsx
1245− - match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])'
1106+ - match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])'
1246 captures:
1107 captures:
1247 1: punctuation.accessor.tsx
1108 1: punctuation.accessor.tsx
1248 2: punctuation.accessor.optional.tsx
1109 2: punctuation.accessor.optional.tsx
1249 3: variable.other.constant.property.tsx
1110 3: variable.other.constant.property.tsx
1250− - match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(\#?[_$[:alpha:]][_$[:alnum:]]*)'
1111+ - match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*([_$[:alpha:]][_$[:alnum:]]*)'
1251 captures:
1112 captures:
1252 1: punctuation.accessor.tsx
1113 1: punctuation.accessor.tsx
1253 2: punctuation.accessor.optional.tsx
1114 2: punctuation.accessor.optional.tsx
@@ -1256,46 +1117,15 @@ contexts:
1256 scope: variable.other.constant.tsx
1117 scope: variable.other.constant.tsx
1257 - match: "[_$[:alpha:]][_$[:alnum:]]*"
1118 - match: "[_$[:alpha:]][_$[:alnum:]]*"
1258 scope: variable.other.readwrite.tsx
1119 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
1287 import-declaration:
1120 import-declaration:
1288− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)(?:\s+(type)(?!\s+from))?(?!\s*[:\(])(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1121+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(import)(?!\s*[:\(])(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1289 captures:
1122 captures:
1290 1: keyword.control.export.tsx
1123 1: keyword.control.export.tsx
1291− 2: storage.modifier.tsx
1124+ 2: keyword.control.import.tsx
1292− 3: keyword.control.import.tsx
1293− 4: keyword.control.type.tsx
1295 - meta_scope: meta.import.tsx
1126 - meta_scope: meta.import.tsx
1296 - match: '(?<!^import|[^\._$[:alnum:]]import)(?=;|$|^)'
1127 - match: '(?<!^import|[^\._$[:alnum:]]import)(?=;|$|^)'
1297 pop: true
1128 pop: true
1298− - include: single-line-comment-consuming-line-ending
1299 - include: comment
1129 - include: comment
1300 - include: string
1130 - include: string
1301 - match: '(?<=^import|[^\._$[:alnum:]]import)(?!\s*["''])'
1131 - match: '(?<=^import|[^\._$[:alnum:]]import)(?!\s*["''])'
@@ -1307,16 +1137,14 @@ contexts:
1307 - include: import-export-declaration
1137 - include: import-export-declaration
1308 - include: import-export-declaration
1138 - include: import-export-declaration
1309 import-equals-declaration:
1139 import-equals-declaration:
1310− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)(?:\s+(type))?\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(require)\s*(\()'
1140+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(import)\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(require)\s*(\()'
1311 captures:
1141 captures:
1312 1: keyword.control.export.tsx
1142 1: keyword.control.export.tsx
1313− 2: storage.modifier.tsx
1143+ 2: keyword.control.import.tsx
1314− 3: keyword.control.import.tsx
1144+ 3: variable.other.readwrite.alias.tsx
1315− 4: keyword.control.type.tsx
1145+ 4: keyword.operator.assignment.tsx
1316− 5: variable.other.readwrite.alias.tsx
1146+ 5: keyword.control.require.tsx
1317− 6: keyword.operator.assignment.tsx
1147+ 6: meta.brace.round.tsx
1318− 7: keyword.control.require.tsx
1319− 8: meta.brace.round.tsx
1321 - meta_scope: meta.import-equals.external.tsx
1149 - meta_scope: meta.import-equals.external.tsx
1322 - match: \)
1150 - match: \)
@@ -1325,19 +1153,16 @@ contexts:
1325 pop: true
1153 pop: true
1326 - include: comment
1154 - include: comment
1327 - include: string
1155 - include: string
1328− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)(?:\s+(type))?\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(?!require\b)'
1156+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(import)\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(?!require\b)'
1329 captures:
1157 captures:
1330 1: keyword.control.export.tsx
1158 1: keyword.control.export.tsx
1331− 2: storage.modifier.tsx
1159+ 2: keyword.control.import.tsx
1332− 3: keyword.control.import.tsx
1160+ 3: variable.other.readwrite.alias.tsx
1333− 4: keyword.control.type.tsx
1161+ 4: keyword.operator.assignment.tsx
1334− 5: variable.other.readwrite.alias.tsx
1335− 6: keyword.operator.assignment.tsx
1337 - meta_scope: meta.import-equals.internal.tsx
1163 - meta_scope: meta.import-equals.internal.tsx
1338 - match: (?=;|$|^)
1164 - match: (?=;|$|^)
1339 pop: true
1165 pop: true
1340− - include: single-line-comment-consuming-line-ending
1341 - include: comment
1166 - include: comment
1342 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))'
1167 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))'
1343 captures:
1168 captures:
@@ -1359,7 +1184,7 @@ contexts:
1359 - include: import-export-clause
1184 - include: import-export-clause
1360 import-export-clause:
1185 import-export-clause:
1361 - include: comment
1186 - include: comment
1362− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bdefault)|(\*)|(\b[_$[:alpha:]][_$[:alnum:]]*))\s+(as)\s+(?:(default(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|([_$[:alpha:]][_$[:alnum:]]*))'
1187+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bdefault)|(\*)|(\b[_$[:alpha:]][_$[:alnum:]]*))\s+(as)\s+(?:(\bdefault(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|(\b[_$[:alpha:]][_$[:alnum:]]*))'
1363 captures:
1188 captures:
1364 1: keyword.control.default.tsx
1189 1: keyword.control.default.tsx
1365 2: constant.language.import-export-all.tsx
1190 2: constant.language.import-export-all.tsx
@@ -1411,9 +1236,6 @@ contexts:
1411 2: keyword.operator.type.modifier.tsx
1236 2: keyword.operator.type.modifier.tsx
1412 3: keyword.operator.optional.tsx
1237 3: keyword.operator.optional.tsx
1413 pop: true
1238 pop: true
1414− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+'
1416− 1: keyword.control.as.tsx
1417 - include: type
1239 - include: type
1418 inline-tags:
1240 inline-tags:
1419 - match: '(\[)[^\]]+(\])(?={@(?:link|linkcode|linkplain|tutorial))'
1241 - match: '(\[)[^\]]+(\])(?={@(?:link|linkcode|linkplain|tutorial))'
@@ -1445,16 +1267,15 @@ contexts:
1445 captures:
1267 captures:
1446 1: keyword.operator.expression.instanceof.tsx
1268 1: keyword.operator.expression.instanceof.tsx
1448− - match: '(?<=\))|(?=[;),}\]:?\-\+\>]|\|\||\&\&|\!\=\=|$|(([\&\~\^\|]\s*)?[_$[:alpha:]][_$[:alnum:]]*\s+instanceof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))function((\s+[_$[:alpha:]][_$[:alnum:]]*)|(\s*[\(]))))'
1270+ - match: '(?<=\))|(?=[;),}\]:?]|\|\||\&\&|$|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))function((\s+[_$[:alpha:]][_$[:alnum:]]*)|(\s*[\(]))))'
1449 pop: true
1271 pop: true
1450 - include: type
1272 - include: type
1451 interface-declaration:
1273 interface-declaration:
1452− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(?:(abstract)\s+)?\b(interface)\b(?=\s+|/[/*])'
1274+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(export)\s+)?\b(?:(abstract)\s+)?\b(interface)\b(?=\s+|/[/*])'
1453 captures:
1275 captures:
1454 1: keyword.control.export.tsx
1276 1: keyword.control.export.tsx
1455 2: storage.modifier.tsx
1277 2: storage.modifier.tsx
1456− 3: storage.modifier.tsx
1278+ 3: storage.type.interface.tsx
1457− 4: storage.type.interface.tsx
1459 - meta_scope: meta.interface.tsx
1280 - meta_scope: meta.interface.tsx
1460 - match: '(?<=\})'
1281 - match: '(?<=\})'
@@ -1502,7 +1323,7 @@ contexts:
1502 captures:
1323 captures:
1503 0: punctuation.section.embedded.begin.tsx
1324 0: punctuation.section.embedded.begin.tsx
1505− - meta_content_scope: meta.embedded.expression.tsx
1326+ - meta_scope: meta.embedded.expression.tsx
1506 - match: '\}'
1327 - match: '\}'
1507 captures:
1328 captures:
1508 0: punctuation.section.embedded.end.tsx
1329 0: punctuation.section.embedded.end.tsx
@@ -1531,10 +1352,10 @@ contexts:
1531 pop: true
1352 pop: true
1532 - include: jsx-entities
1353 - include: jsx-entities
1533 jsx-tag:
1354 jsx-tag:
1534− - match: '(?=(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))'
1355+ - match: '(?=(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))'
1536 - meta_scope: meta.tag.tsx
1357 - meta_scope: meta.tag.tsx
1537− - match: '(/>)|(?:(</)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))?\s*(>))'
1358+ - match: '(/>)|(?:(</)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))?\s*(>))'
1538 captures:
1359 captures:
1539 1: punctuation.definition.tag.end.tsx
1360 1: punctuation.definition.tag.end.tsx
1540 2: punctuation.definition.tag.begin.tsx
1361 2: punctuation.definition.tag.begin.tsx
@@ -1544,7 +1365,7 @@ contexts:
1544 6: support.class.component.tsx
1365 6: support.class.component.tsx
1545 7: punctuation.definition.tag.end.tsx
1366 7: punctuation.definition.tag.end.tsx
1546 pop: true
1367 pop: true
1547− - match: '(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>)'
1368+ - match: '(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>)'
1548 captures:
1369 captures:
1549 1: punctuation.definition.tag.begin.tsx
1370 1: punctuation.definition.tag.begin.tsx
1550 2: entity.name.tag.namespace.tsx
1371 2: entity.name.tag.namespace.tsx
@@ -1572,8 +1393,8 @@ contexts:
1572 - match: |-
1393 - match: |-
1575− (?:([_$[:alpha:]][-_$[:alnum:].]*)(:))?
1396+ (?:([_$[:alpha:]][-$[:alnum:].]*)(:))?
1576− ([_$[:alpha:]][-_$[:alnum:]]*)
1397+ ([_$[:alpha:]][-$[:alnum:]]*)
1577 (?=\s|=|/?>|/\*|//)
1398 (?=\s|=|/?>|/\*|//)
1578 captures:
1399 captures:
1579 1: entity.other.attribute-name.namespace.tsx
1400 1: entity.other.attribute-name.namespace.tsx
@@ -1598,15 +1419,15 @@ contexts:
1598 jsx-tag-in-expression:
1419 jsx-tag-in-expression:
1599 - match: |-
1420 - match: |-
1601− (?<!\+\+|--)(?<=[({\[,?=>:*]|&&|\|\||\?|\*\/|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^default|[^\._$[:alnum:]]default|^yield|[^\._$[:alnum:]]yield|^)\s*
1422+ (?<!\+\+|--)(?<=[({\[,?=>:*]|&&|\|\||\?|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^default|[^\._$[:alnum:]]default|^yield|[^\._$[:alnum:]]yield|^)\s*
1602 (?!<\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s+[^=>])|,)) # look ahead is not type parameter of arrow
1423 (?!<\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s+[^=>])|,)) # look ahead is not type parameter of arrow
1603− (?=(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))
1424+ (?=(<)\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+))(?!\?)|\/?>))'
1426+ - match: '(?!(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))'
1606 pop: true
1427 pop: true
1607 - include: jsx-tag
1428 - include: jsx-tag
1608 jsx-tag-without-attributes:
1429 jsx-tag-without-attributes:
1609− - match: '(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))?\s*(>)'
1430+ - match: '(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))?\s*(>)'
1610 captures:
1431 captures:
1611 1: punctuation.definition.tag.begin.tsx
1432 1: punctuation.definition.tag.begin.tsx
1612 2: entity.name.tag.namespace.tsx
1433 2: entity.name.tag.namespace.tsx
@@ -1617,7 +1438,7 @@ contexts:
1618 - meta_scope: meta.tag.without-attributes.tsx
1439 - meta_scope: meta.tag.without-attributes.tsx
1619 - meta_content_scope: meta.jsx.children.tsx
1440 - meta_content_scope: meta.jsx.children.tsx
1620− - match: '(</)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))?\s*(>)'
1441+ - match: '(</)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))?\s*(>)'
1621 captures:
1442 captures:
1622 1: punctuation.definition.tag.begin.tsx
1443 1: punctuation.definition.tag.begin.tsx
1623 2: entity.name.tag.namespace.tsx
1444 2: entity.name.tag.namespace.tsx
@@ -1628,9 +1449,9 @@ contexts:
1628 pop: true
1449 pop: true
1629 - include: jsx-children
1450 - include: jsx-children
1630 jsx-tag-without-attributes-in-expression:
1451 jsx-tag-without-attributes-in-expression:
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*(>))'
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*(>))'
1633− - match: '(?!(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))?\s*(>))'
1454+ - match: '(?!(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))?\s*(>))'
1634 pop: true
1455 pop: true
1635 - include: jsx-tag-without-attributes
1456 - include: jsx-tag-without-attributes
@@ -1656,27 +1477,25 @@ contexts:
1656 - include: this-literal
1477 - include: this-literal
1657 - include: super-literal
1478 - include: super-literal
1658 method-declaration:
1479 method-declaration:
1659− - match: '(?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(override)\s+)?(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?\s*\b(constructor)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1480+ - match: '(?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?\s*\b(constructor)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1660 captures:
1481 captures:
1661 1: storage.modifier.tsx
1482 1: storage.modifier.tsx
1662 2: storage.modifier.tsx
1483 2: storage.modifier.tsx
1663− 3: storage.modifier.tsx
1484+ 3: storage.modifier.async.tsx
1664− 4: storage.modifier.async.tsx
1485+ 4: storage.type.tsx
1665− 5: storage.type.tsx
1667 - meta_scope: meta.method.declaration.tsx
1487 - meta_scope: meta.method.declaration.tsx
1668 - match: '(?=\}|;|,|$)|(?<=\})'
1488 - match: '(?=\}|;|,|$)|(?<=\})'
1669 pop: true
1489 pop: true
1670 - include: method-declaration-name
1490 - include: method-declaration-name
1671 - include: function-body
1491 - include: function-body
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*))?[\(])'
1492+ - match: '(?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?(?:(?:\s*\b(new)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|(?:(\*)\s*)?)(?=\s*[\(\<])'
1673 captures:
1493 captures:
1674 1: storage.modifier.tsx
1494 1: storage.modifier.tsx
1675 2: storage.modifier.tsx
1495 2: storage.modifier.tsx
1676− 3: storage.modifier.tsx
1496+ 3: storage.modifier.async.tsx
1677− 4: storage.modifier.async.tsx
1497+ 4: keyword.operator.new.tsx
1678− 5: keyword.operator.new.tsx
1498+ 5: keyword.generator.asterisk.tsx
1679− 6: keyword.generator.asterisk.tsx
1681 - meta_scope: meta.method.declaration.tsx
1500 - meta_scope: meta.method.declaration.tsx
1682 - match: '(?=\}|;|,|$)|(?<=\})'
1501 - match: '(?=\}|;|,|$)|(?<=\})'
@@ -1684,23 +1503,22 @@ contexts:
1684 - include: method-declaration-name
1503 - include: method-declaration-name
1685 - include: function-body
1504 - include: function-body
1686 - match: |-
1505 - match: |-
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(?!\$))|((?<!\$)(?:
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(?!\$))|((?<!\$)(?:
1688− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1507+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1689− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1508+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1690− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1509+ (?:\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
1510+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1692− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1511+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1693− (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1512+ (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1694− (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1513+ (?:\B(\.)[0-9][0-9_]*\b)| # .1
1695− (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1514+ (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1696− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(])
1515+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*[\(\<])
1697 captures:
1516 captures:
1698 1: storage.modifier.tsx
1517 1: storage.modifier.tsx
1699 2: storage.modifier.tsx
1518 2: storage.modifier.tsx
1700− 3: storage.modifier.tsx
1519+ 3: storage.modifier.async.tsx
1701− 4: storage.modifier.async.tsx
1520+ 4: storage.type.property.tsx
1702− 5: storage.type.property.tsx
1521+ 5: keyword.generator.asterisk.tsx
1703− 6: keyword.generator.asterisk.tsx
1705 - meta_scope: meta.method.declaration.tsx
1523 - meta_scope: meta.method.declaration.tsx
1706 - match: '(?=\}|;|,|$)|(?<=\})'
1524 - match: '(?=\}|;|,|$)|(?<=\})'
@@ -1709,16 +1527,16 @@ contexts:
1709 - include: function-body
1527 - include: function-body
1710 method-declaration-name:
1528 method-declaration-name:
1711 - match: |-
1529 - match: |-
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(?!\$))|((?<!\$)(?:
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(?!\$))|((?<!\$)(?:
1713− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1531+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1714− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1532+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1715− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1533+ (?:\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
1534+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1717− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1535+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1718− (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1536+ (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1719− (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1537+ (?:\B(\.)[0-9][0-9_]*\b)| # .1
1720− (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1538+ (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1721− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??)\s*[\(\<])
1539+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??)\s*[\(\<])
1723 - match: (?=\(|\<)
1541 - match: (?=\(|\<)
1724 pop: true
1542 pop: true
@@ -1730,14 +1548,13 @@ contexts:
1730 - match: \?
1548 - match: \?
1731 scope: keyword.operator.optional.tsx
1549 scope: keyword.operator.optional.tsx
1732 namespace-declaration:
1550 namespace-declaration:
1733− - match: '(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(namespace|module)\s+(?=[_$[:alpha:]"''`]))'
1551+ - match: '(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(namespace|module)\s+(?=[_$[:alpha:]"''`]))'
1734 captures:
1552 captures:
1735 1: keyword.control.export.tsx
1553 1: keyword.control.export.tsx
1736− 2: storage.modifier.tsx
1554+ 2: storage.type.namespace.tsx
1737− 3: storage.type.namespace.tsx
1739 - meta_scope: meta.namespace.declaration.tsx
1556 - meta_scope: meta.namespace.declaration.tsx
1740− - match: '(?<=\})|(?=;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
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)'
1741 pop: true
1558 pop: true
1742 - include: comment
1559 - include: comment
1743 - include: string
1560 - include: string
@@ -1751,53 +1568,41 @@ contexts:
1751 1: keyword.operator.new.tsx
1568 1: keyword.operator.new.tsx
1753 - meta_scope: new.expr.tsx
1570 - meta_scope: new.expr.tsx
1754− - match: '(?<=\))|(?=[;),}\]:?\-\+\>]|\|\||\&\&|\!\=\=|$|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))new(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))function((\s+[_$[:alpha:]][_$[:alnum:]]*)|(\s*[\(]))))'
1571+ - match: '(?<=\))|(?=[;),}\]:]|\|\||\&\&|$|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))new(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))function((\s+[_$[:alpha:]][_$[:alnum:]]*)|(\s*[\(]))))'
1755 pop: true
1572 pop: true
1756− - include: expression
1573+ - include: paren-expression
1574+ - include: class-declaration
1757 null-literal:
1576 null-literal:
1758 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))null(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1577 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))null(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1759 scope: constant.language.null.tsx
1578 scope: constant.language.null.tsx
1760 numeric-literal:
1579 numeric-literal:
1761− - match: '\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$)'
1580+ - match: '\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$)'
1762 scope: constant.numeric.hex.tsx
1581 scope: constant.numeric.hex.tsx
1763− captures:
1582+ - match: '\b(?<!\$)0(b|B)[01][01_]*\b(?!\$)'
1764− 1: storage.type.numeric.bigint.tsx
1765− - match: '\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$)'
1766 scope: constant.numeric.binary.tsx
1583 scope: constant.numeric.binary.tsx
1767− captures:
1584+ - match: '\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$)'
1768− 1: storage.type.numeric.bigint.tsx
1769− - match: '\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$)'
1770 scope: constant.numeric.octal.tsx
1585 scope: constant.numeric.octal.tsx
1772− 1: storage.type.numeric.bigint.tsx
1773 - match: |-
1586 - match: |-
1775 (?<!\$)(?:
1588 (?<!\$)(?:
1776− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1589+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1777− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1590+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1778− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1591+ (?:\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
1592+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1780− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1593+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1781− (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1594+ (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1782− (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1595+ (?:\B(\.)[0-9][0-9_]*\b)| # .1
1783− (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1596+ (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1785 captures:
1598 captures:
1786 0: constant.numeric.decimal.tsx
1599 0: constant.numeric.decimal.tsx
1787 1: meta.delimiter.decimal.period.tsx
1600 1: meta.delimiter.decimal.period.tsx
1788− 2: storage.type.numeric.bigint.tsx
1601+ 2: meta.delimiter.decimal.period.tsx
1789 3: meta.delimiter.decimal.period.tsx
1602 3: meta.delimiter.decimal.period.tsx
1790− 4: storage.type.numeric.bigint.tsx
1603+ 4: meta.delimiter.decimal.period.tsx
1791 5: meta.delimiter.decimal.period.tsx
1604 5: meta.delimiter.decimal.period.tsx
1792− 6: storage.type.numeric.bigint.tsx
1605+ 6: meta.delimiter.decimal.period.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
1801 numericConstant-literal:
1606 numericConstant-literal:
1802 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))NaN(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1607 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))NaN(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1803 scope: constant.language.nan.tsx
1608 scope: constant.language.nan.tsx
@@ -1806,16 +1611,16 @@ contexts:
1806 object-binding-element:
1611 object-binding-element:
1807 - include: comment
1612 - include: comment
1808 - match: |-
1613 - match: |-
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(?!\$))|((?<!\$)(?:
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(?!\$))|((?<!\$)(?:
1810− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1615+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1811− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1616+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1812− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1617+ (?:\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
1618+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1814− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1619+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1815− (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1620+ (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1816− (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1621+ (?:\B(\.)[0-9][0-9_]*\b)| # .1
1817− (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1622+ (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1818− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
1623+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
1820 - match: '(?=,|\})'
1625 - match: '(?=,|\})'
1821 pop: true
1626 pop: true
@@ -1828,16 +1633,16 @@ contexts:
1828 object-binding-element-const:
1633 object-binding-element-const:
1829 - include: comment
1634 - include: comment
1830 - match: |-
1635 - match: |-
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(?!\$))|((?<!\$)(?:
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(?!\$))|((?<!\$)(?:
1832− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1637+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1833− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1638+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1834− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1639+ (?:\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
1640+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1836− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1641+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1837− (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1642+ (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1838− (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1643+ (?:\B(\.)[0-9][0-9_]*\b)| # .1
1839− (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1644+ (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1840− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
1645+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
1842 - match: '(?=,|\})'
1647 - match: '(?=,|\})'
1843 pop: true
1648 pop: true
@@ -1849,16 +1654,16 @@ contexts:
1849 - include: punctuation-comma
1654 - include: punctuation-comma
1850 object-binding-element-propertyName:
1655 object-binding-element-propertyName:
1851 - match: |-
1656 - match: |-
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(?!\$))|((?<!\$)(?:
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(?!\$))|((?<!\$)(?:
1853− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1658+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1854− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1659+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1855− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1660+ (?:\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
1661+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1857− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1662+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1858− (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1663+ (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1859− (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1664+ (?:\B(\.)[0-9][0-9_]*\b)| # .1
1860− (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1665+ (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1861− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
1666+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
1863 - match: (:)
1668 - match: (:)
1864 captures:
1669 captures:
@@ -1896,9 +1701,9 @@ contexts:
1896 scope: support.class.tsx
1701 scope: support.class.tsx
1897 - match: |-
1702 - match: |-
1898 (?x)(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(?:
1703 (?x)(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(?:
1899− (\#?[[:upper:]][_$[:digit:][:upper:]]*) |
1704+ ([[:upper:]][_$[:digit:][:upper:]]*) |
1900− (\#?[_$[:alpha:]][_$[:alnum:]]*)
1705+ ([_$[:alpha:]][_$[:alnum:]]*)
1901− )(?=\s*\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*)
1706+ )(?=\s*\??\.\s*[_$[:alpha:]][_$[:alnum:]]*)
1902 captures:
1707 captures:
1903 1: punctuation.accessor.tsx
1708 1: punctuation.accessor.tsx
1904 2: punctuation.accessor.optional.tsx
1709 2: punctuation.accessor.optional.tsx
@@ -1908,7 +1713,7 @@ contexts:
1909 ([[:upper:]][_$[:digit:][:upper:]]*) |
1714 ([[:upper:]][_$[:digit:][:upper:]]*) |
1910 ([_$[:alpha:]][_$[:alnum:]]*)
1715 ([_$[:alpha:]][_$[:alnum:]]*)
1911− )(?=\s*\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*)
1716+ )(?=\s*\??\.\s*[_$[:alpha:]][_$[:alnum:]]*)
1912 captures:
1717 captures:
1913 1: variable.other.constant.object.tsx
1718 1: variable.other.constant.object.tsx
1914 2: variable.other.object.tsx
1719 2: variable.other.object.tsx
@@ -1925,16 +1730,16 @@ contexts:
1925 - include: object-member
1730 - include: object-member
1926 object-literal-method-declaration:
1731 object-literal-method-declaration:
1927 - match: |-
1732 - match: |-
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(?!\$))|((?<!\$)(?:
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(?!\$))|((?<!\$)(?:
1929− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1734+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1930− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1735+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1931− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1736+ (?:\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
1737+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1933− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1738+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1934− (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1739+ (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1935− (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1740+ (?:\B(\.)[0-9][0-9_]*\b)| # .1
1936− (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1741+ (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1937− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(])
1742+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*[\(\<])
1938 captures:
1743 captures:
1939 1: storage.modifier.async.tsx
1744 1: storage.modifier.async.tsx
1940 2: storage.type.property.tsx
1745 2: storage.type.property.tsx
@@ -1946,16 +1751,16 @@ contexts:
1946 - include: method-declaration-name
1751 - include: method-declaration-name
1947 - include: function-body
1752 - include: function-body
1948 - match: |-
1753 - match: |-
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(?!\$))|((?<!\$)(?:
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(?!\$))|((?<!\$)(?:
1950− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1755+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1951− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1756+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1952− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1757+ (?:\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
1758+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1954− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1759+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1955− (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1760+ (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1956− (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1761+ (?:\B(\.)[0-9][0-9_]*\b)| # .1
1957− (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1762+ (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1958− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(])
1763+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*[\(\<])
1959 captures:
1764 captures:
1960 1: storage.modifier.async.tsx
1765 1: storage.modifier.async.tsx
1961 2: storage.type.property.tsx
1766 2: storage.type.property.tsx
@@ -1972,56 +1777,37 @@ contexts:
1972 - meta_scope: meta.object.member.tsx meta.object-literal.key.tsx
1777 - meta_scope: meta.object.member.tsx meta.object-literal.key.tsx
1973 - match: '(?=:)|((?<=[\]])(?=\s*[\(\<]))'
1778 - match: '(?=:)|((?<=[\]])(?=\s*[\(\<]))'
1974 pop: true
1779 pop: true
1976 - include: array-literal
1780 - include: array-literal
1977− - match: '(?=[\''\"\`])'
1781+ - match: '(?=[\''\"])'
1979 - meta_scope: meta.object.member.tsx meta.object-literal.key.tsx
1783 - meta_scope: meta.object.member.tsx meta.object-literal.key.tsx
1980− - match: '(?=:)|((?<=[\''\"\`])(?=((\s*[\(\<,}])|(\s+(as)\s+))))'
1784+ - match: '(?=:)|((?<=[\''\"])(?=\s*[\(\<]))'
1981 pop: true
1785 pop: true
1983 - include: string
1786 - include: string
1984− - match: |-
1787+ - match: '(?<=[\]\''\"])(?=\s*[\(\<])'
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*[\(\<])'
2003 - meta_scope: meta.method.declaration.tsx
1789 - meta_scope: meta.method.declaration.tsx
2004 - match: '(?=\}|;|,)|(?<=\})'
1790 - match: '(?=\}|;|,)|(?<=\})'
2005 pop: true
1791 pop: true
2006 - include: function-body
1792 - include: function-body
2007− - match: '(?![_$[:alpha:]])([[:digit:]]+)\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*:)'
1793+ - match: '(?![_$[:alpha:]])([[:digit:]]+)\s*(?=:)'
2008 scope: meta.object.member.tsx
1794 scope: meta.object.member.tsx
2009 captures:
1795 captures:
2010 0: meta.object-literal.key.tsx
1796 0: meta.object-literal.key.tsx
2011 1: constant.numeric.decimal.tsx
1797 1: constant.numeric.decimal.tsx
2012 - match: |-
1798 - match: |-
2013− (?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*:(\s*\/\*([^\*]|(\*[^\/]))*\*\/)*\s*(
1799+ (?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\s*(?=:\s*(
2014 ((async\s+)?(
1800 ((async\s+)?(
2015 (function\s*[(<*]) |
1801 (function\s*[(<*]) |
2016 (function\s+) |
1802 (function\s+) |
2017 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1803 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
2019 ((async\s*)?(
1805 ((async\s*)?(
2020− ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
1806+ ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
2021 # sure shot arrow functions even if => is on new line
1807 # sure shot arrow functions even if => is on new line
2023− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
1809+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
2024− [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
1810+ [(]\s*
2026 ([)]\s*:) | # ():
1812 ([)]\s*:) | # ():
2027 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
1813 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -2032,9 +1818,9 @@ contexts:
2033 # arrow function possible to detect only with => on same line
1819 # arrow function possible to detect only with => on same line
2035− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
1821+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
2036− \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
1822+ \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
2037− (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
1823+ (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
2038 \s*=> # arrow operator
1824 \s*=> # arrow operator
@@ -2043,7 +1829,7 @@ contexts:
2043 captures:
1829 captures:
2044 0: meta.object-literal.key.tsx
1830 0: meta.object-literal.key.tsx
2045 1: entity.name.function.tsx
1831 1: entity.name.function.tsx
2046− - match: '(?:[_$[:alpha:]][_$[:alnum:]]*)\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*:)'
1832+ - match: '(?:[_$[:alpha:]][_$[:alnum:]]*)\s*(?=:)'
2047 scope: meta.object.member.tsx
1833 scope: meta.object.member.tsx
2048 captures:
1834 captures:
2049 0: meta.object-literal.key.tsx
1835 0: meta.object-literal.key.tsx
@@ -2055,27 +1841,14 @@ contexts:
2055 - match: '(?=,|\})'
1841 - match: '(?=,|\})'
2056 pop: true
1842 pop: true
2057 - include: expression
1843 - include: expression
2058− - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?=,|\}|$|\/\/|\/\*)'
1844+ - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?=,|\}|$)'
2059 scope: meta.object.member.tsx
1845 scope: meta.object.member.tsx
2060 captures:
1846 captures:
2061 1: variable.other.readwrite.tsx
1847 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+))'
2075 - match: '(?=[_$[:alpha:]][_$[:alnum:]]*\s*=)'
1848 - match: '(?=[_$[:alpha:]][_$[:alnum:]]*\s*=)'
2077 - meta_scope: meta.object.member.tsx
1850 - meta_scope: meta.object.member.tsx
2078− - match: '(?=,|\}|$|\/\/|\/\*)'
1851+ - match: '(?=,|\}|$)'
2079 pop: true
1852 pop: true
2080 - include: expression
1853 - include: expression
2081 - match: ":"
1854 - match: ":"
@@ -2085,7 +1858,7 @@ contexts:
2085 - meta_scope: meta.object.member.tsx
1858 - meta_scope: meta.object.member.tsx
2086 - match: '(?=,|\})'
1859 - match: '(?=,|\})'
2087 pop: true
1860 pop: true
2088− - match: '(?<=:)\s*(async)?(?=\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)\(\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))'
1861+ - match: '(?<=:)\s*(async)?(?=\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)\(\s*([\{\[]\s*)?$)'
2089 captures:
1862 captures:
2090 1: storage.modifier.async.tsx
1863 1: storage.modifier.async.tsx
@@ -2101,7 +1874,7 @@ contexts:
2101 0: meta.brace.round.tsx
1874 0: meta.brace.round.tsx
2102 pop: true
1875 pop: true
2103 - include: expression-inside-possibly-arrow-parens
1876 - include: expression-inside-possibly-arrow-parens
2104− - match: '(?<=:)\s*(async)?\s*(\()(?=\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))'
1877+ - match: '(?<=:)\s*(async)?\s*(\()(?=\s*([\{\[]\s*)?$)'
2105 captures:
1878 captures:
2106 1: storage.modifier.async.tsx
1879 1: storage.modifier.async.tsx
2107 2: meta.brace.round.tsx
1880 2: meta.brace.round.tsx
@@ -2111,23 +1884,6 @@ contexts:
2111 0: meta.brace.round.tsx
1884 0: meta.brace.round.tsx
2112 pop: true
1885 pop: true
2113 - include: expression-inside-possibly-arrow-parens
1886 - 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
2131 - include: expression
1887 - include: expression
2132 - include: punctuation-comma
1888 - include: punctuation-comma
2133 parameter-array-binding-pattern:
1889 parameter-array-binding-pattern:
@@ -2145,18 +1901,16 @@ contexts:
2145 parameter-binding-element:
1901 parameter-binding-element:
2146 - include: comment
1902 - include: comment
2147 - include: string
1903 - include: string
2148− - include: numeric-literal
2150 - include: parameter-object-binding-pattern
1904 - include: parameter-object-binding-pattern
2151 - include: parameter-array-binding-pattern
1905 - include: parameter-array-binding-pattern
2152 - include: destructuring-parameter-rest
1906 - include: destructuring-parameter-rest
2153 - include: variable-initializer
1907 - include: variable-initializer
2154 parameter-name:
1908 parameter-name:
2155− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|protected|private|readonly)\s+(?=(override|public|protected|private|readonly)\s+)'
1909+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|protected|private|readonly)\s+(?=(public|protected|private|readonly)\s+)'
2156 captures:
1910 captures:
2157 1: storage.modifier.tsx
1911 1: storage.modifier.tsx
2158 - match: |-
1912 - match: |-
2159− (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*
1913+ (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*
2160 # function assignment |
1914 # function assignment |
2162 ((async\s+)?(
1916 ((async\s+)?(
@@ -2165,11 +1919,11 @@ contexts:
2165 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1919 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
2167 ((async\s*)?(
1921 ((async\s*)?(
2168− ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
1922+ ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
2169 # sure shot arrow functions even if => is on new line
1923 # sure shot arrow functions even if => is on new line
2171− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
1925+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
2172− [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
1926+ [(]\s*
2174 ([)]\s*:) | # ():
1928 ([)]\s*:) | # ():
2175 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
1929 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -2180,9 +1934,9 @@ contexts:
2181 # arrow function possible to detect only with => on same line
1935 # arrow function possible to detect only with => on same line
2183− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
1937+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
2184− \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
1938+ \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
2185− (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
1939+ (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
2186 \s*=> # arrow operator
1940 \s*=> # arrow operator
@@ -2199,20 +1953,19 @@ contexts:
2202− (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
1956+ (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$))) |
2203− (:\s*((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
1957+ (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
2204− (:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
2205 ((async\s+)?(
1958 ((async\s+)?(
2206 (function\s*[(<*]) |
1959 (function\s*[(<*]) |
2207 (function\s+) |
1960 (function\s+) |
2208 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1961 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
2210 ((async\s*)?(
1963 ((async\s*)?(
2211− ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
1964+ ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
2212 # sure shot arrow functions even if => is on new line
1965 # sure shot arrow functions even if => is on new line
2214− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
1967+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
2215− [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
1968+ [(]\s*
2217 ([)]\s*:) | # ():
1970 ([)]\s*:) | # ():
2218 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
1971 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -2223,9 +1976,9 @@ contexts:
2224 # arrow function possible to detect only with => on same line
1977 # arrow function possible to detect only with => on same line
2226− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
1979+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
2227− \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
1980+ \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
2228− (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
1981+ (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
2229 \s*=> # arrow operator
1982 \s*=> # arrow operator
@@ -2236,7 +1989,7 @@ contexts:
2236 3: entity.name.function.tsx variable.language.this.tsx
1989 3: entity.name.function.tsx variable.language.this.tsx
2237 4: entity.name.function.tsx
1990 4: entity.name.function.tsx
2238 5: keyword.operator.optional.tsx
1991 5: keyword.operator.optional.tsx
2239− - match: '(?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)'
1992+ - match: '(?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)'
2240 captures:
1993 captures:
2241 1: storage.modifier.tsx
1994 1: storage.modifier.tsx
2242 2: keyword.operator.rest.tsx
1995 2: keyword.operator.rest.tsx
@@ -2246,16 +1999,16 @@ contexts:
2246 parameter-object-binding-element:
1999 parameter-object-binding-element:
2247 - include: comment
2000 - include: comment
2248 - match: |-
2001 - match: |-
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(?!\$))|((?<!\$)(?:
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(?!\$))|((?<!\$)(?:
2250− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
2003+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
2251− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
2004+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
2252− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
2005+ (?:\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
2006+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
2254− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
2007+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
2255− (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
2008+ (?:\b[0-9][0-9_]*(\.)\B)| # 1.
2256− (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
2009+ (?:\B(\.)[0-9][0-9_]*\b)| # .1
2257− (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
2010+ (?:\b[0-9][0-9_]*\b(?!\.)) # 1
2258− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
2011+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
2260 - match: '(?=,|\})'
2013 - match: '(?=,|\})'
2261 pop: true
2014 pop: true
@@ -2276,15 +2029,6 @@ contexts:
2276 0: punctuation.definition.binding-pattern.object.tsx
2029 0: punctuation.definition.binding-pattern.object.tsx
2277 pop: true
2030 pop: true
2278 - include: parameter-object-binding-element
2031 - 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: "(?=[,)])|(?==[^>])"
2288 paren-expression:
2032 paren-expression:
2289 - match: \(
2033 - match: \(
2290 captures:
2034 captures:
@@ -2296,14 +2040,14 @@ contexts:
2296 pop: true
2040 pop: true
2297 - include: expression
2041 - include: expression
2298 paren-expression-possibly-arrow:
2042 paren-expression-possibly-arrow:
2299− - match: '(?<=[(=,])\s*(async)?(?=\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?\(\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))'
2043+ - match: '(?<=[(=,])\s*(async)?(?=\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*))?\(\s*[\{\[]\s*$)'
2300 captures:
2044 captures:
2301 1: storage.modifier.async.tsx
2045 1: storage.modifier.async.tsx
2303 - match: (?<=\))
2047 - match: (?<=\))
2304 pop: true
2048 pop: true
2305 - include: paren-expression-possibly-arrow-with-typeparameters
2049 - include: paren-expression-possibly-arrow-with-typeparameters
2306− - match: '(?<=[(=,]|=>|^return|[^\._$[:alnum:]]return)\s*(async)?(?=\s*((((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?\()|(<))\s*$)'
2050+ - match: '(?<=[(=,]|=>)\s*(async)?(?=\s*((((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*))?\()|(<))\s*$)'
2307 captures:
2051 captures:
2308 1: storage.modifier.async.tsx
2052 1: storage.modifier.async.tsx
@@ -2323,7 +2067,7 @@ contexts:
2323 pop: true
2067 pop: true
2324 - include: expression-inside-possibly-arrow-parens
2068 - include: expression-inside-possibly-arrow-parens
2325 possibly-arrow-return-type:
2069 possibly-arrow-return-type:
2326− - match: '(?<=\)|^)\s*(:)(?=\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*=>)'
2070+ - match: '(?<=\))\s*(:)(?=\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+\s*=>)'
2327 captures:
2071 captures:
2328 1: meta.arrow.tsx meta.return.type.arrow.tsx keyword.operator.type.annotation.tsx
2072 1: meta.arrow.tsx meta.return.type.arrow.tsx keyword.operator.type.annotation.tsx
@@ -2370,23 +2114,23 @@ contexts:
2370 pop: true
2114 pop: true
2371 - include: string-character-escape
2115 - include: string-character-escape
2373− - match: '(?<!\+\+|--|})(?<=[=(:,\[?+!]|^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case|=>|&&|\|\||\*\/)\s*(\/)(?![\/*])(?=(?:[^\/\\\[\()]|\\.|\[([^\]\\]|\\.)+\]|\(([^\)\\]|\\.)+\))+\/([dgimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))'
2117+ - match: '(?<!\+\+|--|})(?<=[=(:,\[?+!]|^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case|=>|&&|\|\||\*\/)\s*(\/)(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)+\])+\/[gimsuy]*(?!\s*[a-zA-Z0-9_$]))'
2374 captures:
2118 captures:
2375 1: punctuation.definition.string.begin.tsx
2119 1: punctuation.definition.string.begin.tsx
2377 - meta_scope: string.regexp.tsx
2121 - meta_scope: string.regexp.tsx
2378− - match: "(/)([dgimsuy]*)"
2122+ - match: "(/)([gimsuy]*)"
2379 captures:
2123 captures:
2380 1: punctuation.definition.string.end.tsx
2124 1: punctuation.definition.string.end.tsx
2381 2: keyword.other.tsx
2125 2: keyword.other.tsx
2382 pop: true
2126 pop: true
2383 - include: regexp
2127 - include: regexp
2384− - match: '((?<![_$[:alnum:])\]]|\+\+|--|}|\*\/)|((?<=^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case))\s*)\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)*\])+\/([dgimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))'
2128+ - match: '(?<![_$[:alnum:])\]]|\+\+|--|})\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)+\])+\/[gimsuy]*(?!\s*[a-zA-Z0-9_$]))'
2385 captures:
2129 captures:
2386 0: punctuation.definition.string.begin.tsx
2130 0: punctuation.definition.string.begin.tsx
2388 - meta_scope: string.regexp.tsx
2132 - meta_scope: string.regexp.tsx
2389− - match: "(/)([dgimsuy]*)"
2133+ - match: "(/)([gimsuy]*)"
2390 captures:
2134 captures:
2391 1: punctuation.definition.string.end.tsx
2135 1: punctuation.definition.string.end.tsx
2392 2: keyword.other.tsx
2136 2: keyword.other.tsx
@@ -2486,24 +2230,10 @@ contexts:
2486 - include: type-object
2230 - include: type-object
2487 - include: type-predicate-operator
2231 - include: type-predicate-operator
2488 - include: type
2232 - 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
2506 statements:
2233 statements:
2235+ - include: template
2507 - include: declaration
2237 - include: declaration
2508 - include: control-statement
2238 - include: control-statement
2509 - include: after-operator-block-as-object-literal
2239 - include: after-operator-block-as-object-literal
@@ -2511,31 +2241,21 @@ contexts:
2511 - include: label
2241 - include: label
2512 - include: expression
2242 - include: expression
2513 - include: punctuation-semicolon
2243 - include: punctuation-semicolon
2517 - include: qstring-single
2245 - include: qstring-single
2518 - include: qstring-double
2246 - include: qstring-double
2519− - include: template
2520 string-character-escape:
2247 string-character-escape:
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]?|.|$)'
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]?|.|$)'
2522 scope: constant.character.escape.tsx
2249 scope: constant.character.escape.tsx
2523 super-literal:
2250 super-literal:
2524 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))super\b(?!\$)'
2251 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))super\b(?!\$)'
2525 scope: variable.language.super.tsx
2252 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
2533 support-objects:
2253 support-objects:
2534 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(arguments)\b(?!\$)'
2254 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(arguments)\b(?!\$)'
2535 scope: variable.language.arguments.tsx
2255 scope: variable.language.arguments.tsx
2536 - match: |-
2256 - match: |-
2537− (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(Array|ArrayBuffer|Atomics|BigInt|BigInt64Array|BigUint64Array|Boolean|DataView|Date|Float32Array
2257+ (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(Array|ArrayBuffer|Atomics|Boolean|DataView|Date|Float32Array|Float64Array|Function|Generator
2538− |Float64Array|Function|Generator|GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Proxy
2258+ |GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Proxy
2539 |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray
2259 |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray
2540 |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\b(?!\$)
2260 |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\b(?!\$)
2541 scope: support.class.builtin.tsx
2261 scope: support.class.builtin.tsx
@@ -2589,9 +2309,9 @@ contexts:
2589 4: support.variable.property.target.tsx
2309 4: support.variable.property.target.tsx
2590 - match: |-
2310 - match: |-
2591 (?x) (?:(\.)|(\?\.(?!\s*[[:digit:]]))) \s* (?:
2311 (?x) (?:(\.)|(\?\.(?!\s*[[:digit:]]))) \s* (?:
2592− (?:(constructor|length|prototype|__proto__)\b(?!\$|\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?\())
2312+ (constructor|length|prototype|__proto__)
2594− (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\b(?!\$)))
2314+ (EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY))\b(?!\$)
2595 captures:
2315 captures:
2596 1: punctuation.accessor.tsx
2316 1: punctuation.accessor.tsx
2597 2: punctuation.accessor.optional.tsx
2317 2: punctuation.accessor.optional.tsx
@@ -2695,7 +2415,7 @@ contexts:
2695 |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary
2415 |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary
2696 |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead
2416 |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead
2697 |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile
2417 |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile
2698− |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\b(?!\$|\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?\()
2418+ |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\b(?!\$|\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?\()
2699 captures:
2419 captures:
2700 1: punctuation.accessor.tsx
2420 1: punctuation.accessor.tsx
2701 2: punctuation.accessor.optional.tsx
2421 2: punctuation.accessor.optional.tsx
@@ -2819,7 +2539,6 @@ contexts:
2819 captures:
2539 captures:
2820 0: punctuation.definition.block.tsx
2540 0: punctuation.definition.block.tsx
2821 pop: true
2541 pop: true
2823 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(switch)\s*(\()'
2542 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(switch)\s*(\()'
2824 captures:
2543 captures:
2825 1: keyword.control.switch.tsx
2544 1: keyword.control.switch.tsx
@@ -2862,34 +2581,7 @@ contexts:
2862 0: case-clause.expr.tsx punctuation.definition.section.case-statement.tsx
2581 0: case-clause.expr.tsx punctuation.definition.section.case-statement.tsx
2863 - include: statements
2582 - include: statements
2864 template:
2583 template:
2865− - include: template-call
2584+ - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?=(<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?!=)\>)*(?!=)>\s*)`)'
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*)`)'
2893 captures:
2585 captures:
2894 1: entity.name.function.tagged-template.tsx
2586 1: entity.name.function.tagged-template.tsx
@@ -2897,20 +2589,6 @@ contexts:
2897 - match: (?=`)
2589 - match: (?=`)
2898 pop: true
2590 pop: true
2899 - include: type-arguments
2591 - 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
2914 - match: "([_$[:alpha:]][_$[:alnum:]]*)?(`)"
2592 - match: "([_$[:alpha:]][_$[:alnum:]]*)?(`)"
2915 captures:
2593 captures:
2916 1: entity.name.function.tagged-template.tsx
2594 1: entity.name.function.tagged-template.tsx
@@ -2921,9 +2599,9 @@ contexts:
2921 captures:
2599 captures:
2922 0: punctuation.definition.string.template.end.tsx
2600 0: punctuation.definition.string.template.end.tsx
2923 pop: true
2601 pop: true
2924− - include: template-type-substitution-element
2602+ - include: template-substitution-element
2925 - include: string-character-escape
2603 - include: string-character-escape
2926− template-type-substitution-element:
2604+ template-substitution-element:
2927 - match: '\$\{'
2605 - match: '\$\{'
2928 captures:
2606 captures:
2929 0: punctuation.definition.template-expression.begin.tsx
2607 0: punctuation.definition.template-expression.begin.tsx
@@ -2934,9 +2612,9 @@ contexts:
2934 captures:
2612 captures:
2935 0: punctuation.definition.template-expression.end.tsx
2613 0: punctuation.definition.template-expression.end.tsx
2936 pop: true
2614 pop: true
2937− - include: type
2615+ - include: expression
2938 ternary-expression:
2616 ternary-expression:
2939− - match: '(?!\?\.\s*[^[:digit:]])(\?)(?!\?)'
2617+ - match: '(?!\?\.\s*[^[:digit:]])(\?)'
2940 captures:
2618 captures:
2941 1: keyword.operator.ternary.tsx
2619 1: keyword.operator.ternary.tsx
@@ -2950,7 +2628,7 @@ contexts:
2950 scope: variable.language.this.tsx
2628 scope: variable.language.this.tsx
2952 - include: comment
2630 - include: comment
2953− - include: type-string
2631+ - include: string
2954 - include: numeric-literal
2632 - include: numeric-literal
2955 - include: type-primitive
2633 - include: type-primitive
2956 - include: type-builtin-literals
2634 - include: type-builtin-literals
@@ -2962,36 +2640,24 @@ contexts:
2962 - include: type-fn-type-parameters
2640 - include: type-fn-type-parameters
2963 - include: type-paren-or-function-parameters
2641 - include: type-paren-or-function-parameters
2964 - include: type-function-return-type
2642 - include: type-function-return-type
2965− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(readonly)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*'
2967− 1: storage.modifier.tsx
2968 - include: type-name
2643 - include: type-name
2969 type-alias-declaration:
2644 type-alias-declaration:
2970− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(type)\b\s+([_$[:alpha:]][_$[:alnum:]]*)\s*'
2645+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(type)\b\s+([_$[:alpha:]][_$[:alnum:]]*)\s*'
2971 captures:
2646 captures:
2972 1: keyword.control.export.tsx
2647 1: keyword.control.export.tsx
2973− 2: storage.modifier.tsx
2648+ 2: storage.type.type.tsx
2974− 3: storage.type.type.tsx
2649+ 3: entity.name.type.alias.tsx
2975− 4: entity.name.type.alias.tsx
2977 - meta_scope: meta.type.declaration.tsx
2651 - meta_scope: meta.type.declaration.tsx
2978− - match: '(?=\}|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
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)'
2979 pop: true
2653 pop: true
2980 - include: comment
2654 - include: comment
2981 - include: type-parameters
2655 - 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))'
2990 - match: (=)\s*
2656 - match: (=)\s*
2991 captures:
2657 captures:
2992 1: keyword.operator.assignment.tsx
2658 1: keyword.operator.assignment.tsx
2994− - match: '(?=\}|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
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)'
2995 pop: true
2661 pop: true
2996 - include: type
2662 - include: type
2997 type-annotation:
2663 type-annotation:
@@ -3021,13 +2687,8 @@ contexts:
3021 captures:
2687 captures:
3022 0: punctuation.definition.typeparameters.end.tsx
2688 0: punctuation.definition.typeparameters.end.tsx
3023 pop: true
2689 pop: true
3024− - include: type-arguments-body
2690+ - include: type
3025− type-arguments-body:
2691+ - include: punctuation-comma
3026− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(_)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3028− 0: keyword.operator.type.tsx
3030− - include: punctuation-comma
3031 type-builtin-literals:
2692 type-builtin-literals:
3032 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(this|true|false|undefined|null|object)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2693 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(this|true|false|undefined|null|object)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3033 scope: support.type.builtin.tsx
2694 scope: support.type.builtin.tsx
@@ -3049,19 +2710,13 @@ contexts:
3049 - include: type
2710 - include: type
3050 - include: type
2711 - include: type
3051 type-fn-type-parameters:
2712 type-fn-type-parameters:
3052− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(abstract)\s+)?(new)\b(?=\s*\<)'
2713+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(new)\b(?=\s*\<)'
2714+ scope: meta.type.constructor.tsx
3053 captures:
2715 captures:
3054− 1: meta.type.constructor.tsx storage.modifier.tsx
2716+ 1: keyword.control.new.tsx
3055− 2: meta.type.constructor.tsx keyword.control.new.tsx
2717+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(new)\b\s*(?=\()'
3060− - include: type-parameters
3061− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(abstract)\s+)?(new)\b\s*(?=\()'
3062 captures:
2718 captures:
3063− 1: storage.modifier.tsx
2719+ 1: keyword.control.new.tsx
3064− 2: keyword.control.new.tsx
3066 - meta_scope: meta.type.constructor.tsx
2721 - meta_scope: meta.type.constructor.tsx
3067 - match: (?<=\))
2722 - match: (?<=\))
@@ -3112,30 +2767,6 @@ contexts:
3112 - include: type-predicate-operator
2767 - include: type-predicate-operator
3113 - include: type
2768 - include: type
3114 type-name:
2769 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
3139 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))'
2770 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))'
3140 captures:
2771 captures:
3141 1: entity.name.type.module.tsx
2772 1: entity.name.type.module.tsx
@@ -3171,16 +2802,18 @@ contexts:
3171 - include: type
2802 - include: type
3172 type-operators:
2803 type-operators:
3173 - include: typeof-operator
2804 - include: typeof-operator
3174− - match: '([&|])(?=\s*\{)'
2805+ - match: '(?:([&|])|(=(?!>)))(?=\s*\{)'
3175 captures:
2806 captures:
3176− 0: keyword.operator.type.tsx
2807+ 1: keyword.operator.type.tsx
2808+ 2: keyword.operator.assignment.tsx
3178 - match: '(?<=\})'
2810 - match: '(?<=\})'
3179 pop: true
2811 pop: true
3180 - include: type-object
2812 - include: type-object
3181− - match: "[&|]"
2813+ - match: "([&|])|(=(?!>))"
3182 captures:
2814 captures:
3183− 0: keyword.operator.type.tsx
2815+ 1: keyword.operator.type.tsx
2816+ 2: keyword.operator.assignment.tsx
3185 - match: (?=\S)
2818 - match: (?=\S)
3186 pop: true
2819 pop: true
@@ -3207,8 +2840,6 @@ contexts:
3207 scope: storage.modifier.tsx
2840 scope: storage.modifier.tsx
3208 - include: type
2841 - include: type
3209 - include: punctuation-comma
2842 - include: punctuation-comma
3211− scope: keyword.operator.assignment.tsx
3212 type-paren-or-function-parameters:
2843 type-paren-or-function-parameters:
3213 - match: \(
2844 - match: \(
3214 captures:
2845 captures:
@@ -3219,6 +2850,7 @@ contexts:
3219 captures:
2850 captures:
3220 0: meta.brace.round.tsx
2851 0: meta.brace.round.tsx
3221 pop: true
2852 pop: true
2853+ - include: destructuring-parameter
3222 - match: |-
2854 - match: |-
3223 (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\s*(\??)(?=\s*(:\s*(
2855 (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\s*(\??)(?=\s*(:\s*(
@@ -3231,8 +2863,7 @@ contexts:
3234− (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
2866+ (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$))))
3235− (:\s*((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))))
3236 captures:
2867 captures:
3237 1: storage.modifier.tsx
2868 1: storage.modifier.tsx
3238 2: keyword.operator.rest.tsx
2869 2: keyword.operator.rest.tsx
@@ -3251,28 +2882,11 @@ contexts:
3251 scope: punctuation.separator.parameter.tsx
2882 scope: punctuation.separator.parameter.tsx
3252 - include: type
2883 - include: type
3253 type-predicate-operator:
2884 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
3267 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))is(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2885 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))is(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3268 scope: keyword.operator.expression.is.tsx
2886 scope: keyword.operator.expression.is.tsx
3269 type-primitive:
2887 type-primitive:
3270− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(string|number|bigint|boolean|symbol|any|void|never|unknown)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2888+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(string|number|boolean|symbol|any|void|never)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3271 scope: support.type.primitive.tsx
2889 scope: support.type.primitive.tsx
3273− - include: qstring-single
3274− - include: qstring-double
3275− - include: template-type
3276 type-tuple:
2890 type-tuple:
3277 - match: '\['
2891 - match: '\['
3278 captures:
2892 captures:
@@ -3283,84 +2897,56 @@ contexts:
3283 captures:
2897 captures:
3284 0: meta.brace.square.tsx
2898 0: meta.brace.square.tsx
3285 pop: true
2899 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
3293 - include: type
2900 - include: type
3294 - include: punctuation-comma
2901 - include: punctuation-comma
3295 typeof-operator:
2902 typeof-operator:
3296 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))typeof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2903 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))typeof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3297− captures:
2904+ scope: keyword.operator.expression.typeof.tsx
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
3303 undefined-literal:
2905 undefined-literal:
3304 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))undefined(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2906 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))undefined(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3305 scope: constant.language.undefined.tsx
2907 scope: constant.language.undefined.tsx
3306 var-expr:
2908 var-expr:
3307− - match: '(?=(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))'
2909+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2911+ 1: keyword.control.export.tsx
2912+ 2: storage.type.tsx
3309 - meta_scope: meta.var.expr.tsx
2914 - meta_scope: meta.var.expr.tsx
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*$)))'
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*$)))'
3311 pop: true
2916 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
3320 - include: destructuring-variable
2917 - include: destructuring-variable
3321 - include: var-single-variable
2918 - include: var-single-variable
3322 - include: variable-initializer
2919 - include: variable-initializer
3323 - include: comment
2920 - include: comment
3324− - match: (,)\s*((?!\S)|(?=\/\/))
2921+ - match: (,)\s*(?!\S)
3325 captures:
2922 captures:
3326 1: punctuation.separator.comma.tsx
2923 1: punctuation.separator.comma.tsx
3328− - match: '(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))'
2925+ - match: '(?<!,)(((?==|;|}|(\s+(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))'
3329 pop: true
2926 pop: true
3330− - include: single-line-comment-consuming-line-ending
3331 - include: comment
2927 - include: comment
3332 - include: destructuring-variable
2928 - include: destructuring-variable
3333 - include: var-single-variable
2929 - include: var-single-variable
3334 - include: punctuation-comma
2930 - include: punctuation-comma
3335 - include: punctuation-comma
2931 - include: punctuation-comma
3336− - match: '(?=(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))'
2932+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3337 captures:
2933 captures:
3338 1: keyword.control.export.tsx
2934 1: keyword.control.export.tsx
3339− 2: storage.modifier.tsx
2935+ 2: storage.type.tsx
3340− 3: storage.type.tsx
3342 - meta_scope: meta.var.expr.tsx
2937 - meta_scope: meta.var.expr.tsx
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*$)))'
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*$)))'
3344 pop: true
2939 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
3353 - include: destructuring-const
2940 - include: destructuring-const
3354 - include: var-single-const
2941 - include: var-single-const
3355 - include: variable-initializer
2942 - include: variable-initializer
3356 - include: comment
2943 - include: comment
3357− - match: (,)\s*((?!\S)|(?=\/\/))
2944+ - match: (,)\s*(?!\S)
3358 captures:
2945 captures:
3359 1: punctuation.separator.comma.tsx
2946 1: punctuation.separator.comma.tsx
3361− - match: '(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))'
2948+ - match: '(?<!,)(((?==|;|}|(\s+(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))'
3362 pop: true
2949 pop: true
3363− - include: single-line-comment-consuming-line-ending
3364 - include: comment
2950 - include: comment
3365 - include: destructuring-const
2951 - include: destructuring-const
3366 - include: var-single-const
2952 - include: var-single-const
@@ -3377,11 +2963,11 @@ contexts:
3377 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
2963 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3379 ((async\s*)?(
2965 ((async\s*)?(
3380− ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
2966+ ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
3381 # sure shot arrow functions even if => is on new line
2967 # sure shot arrow functions even if => is on new line
3383− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
2969+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
3384− [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
2970+ [(]\s*
3386 ([)]\s*:) | # ():
2972 ([)]\s*:) | # ():
3387 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
2973 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -3392,9 +2978,9 @@ contexts:
3393 # arrow function possible to detect only with => on same line
2979 # arrow function possible to detect only with => on same line
3395− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
2981+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
3396− \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
2982+ \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
3397− (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
2983+ (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
3398 \s*=> # arrow operator
2984 \s*=> # arrow operator
@@ -3411,20 +2997,19 @@ contexts:
3414− (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
3000+ (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$))) |
3415− (:\s*((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
3001+ (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
3416− (:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
3417 ((async\s+)?(
3002 ((async\s+)?(
3418 (function\s*[(<*]) |
3003 (function\s*[(<*]) |
3419 (function\s+) |
3004 (function\s+) |
3420 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3005 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3422 ((async\s*)?(
3007 ((async\s*)?(
3423− ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
3008+ ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
3424 # sure shot arrow functions even if => is on new line
3009 # sure shot arrow functions even if => is on new line
3426− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
3011+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
3427− [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
3012+ [(]\s*
3429 ([)]\s*:) | # ():
3014 ([)]\s*:) | # ():
3430 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
3015 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -3435,9 +3020,9 @@ contexts:
3436 # arrow function possible to detect only with => on same line
3021 # arrow function possible to detect only with => on same line
3438− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
3023+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
3439− \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
3024+ \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
3440− (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
3025+ (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
3441 \s*=> # arrow operator
3026 \s*=> # arrow operator
@@ -3446,7 +3031,7 @@ contexts:
3446 1: meta.definition.variable.tsx variable.other.constant.tsx entity.name.function.tsx
3031 1: meta.definition.variable.tsx variable.other.constant.tsx entity.name.function.tsx
3448 - meta_scope: meta.var-single-variable.expr.tsx
3033 - meta_scope: meta.var-single-variable.expr.tsx
3449− - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
3034+ - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
3450 pop: true
3035 pop: true
3451 - include: var-single-variable-type-annotation
3036 - include: var-single-variable-type-annotation
3452 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
3037 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
@@ -3454,12 +3039,12 @@ contexts:
3454 1: meta.definition.variable.tsx variable.other.constant.tsx
3039 1: meta.definition.variable.tsx variable.other.constant.tsx
3456 - meta_scope: meta.var-single-variable.expr.tsx
3041 - meta_scope: meta.var-single-variable.expr.tsx
3457− - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
3042+ - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
3458 pop: true
3043 pop: true
3459 - include: var-single-variable-type-annotation
3044 - include: var-single-variable-type-annotation
3460 var-single-variable:
3045 var-single-variable:
3461 - match: |-
3046 - match: |-
3462− (?x)([_$[:alpha:]][_$[:alnum:]]*)(\!)?(?=\s*
3047+ (?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\s*
3463 # function assignment |
3048 # function assignment |
3465 ((async\s+)?(
3050 ((async\s+)?(
@@ -3468,11 +3053,11 @@ contexts:
3468 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3053 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3470 ((async\s*)?(
3055 ((async\s*)?(
3471− ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
3056+ ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
3472 # sure shot arrow functions even if => is on new line
3057 # sure shot arrow functions even if => is on new line
3474− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
3059+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
3475− [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
3060+ [(]\s*
3477 ([)]\s*:) | # ():
3062 ([)]\s*:) | # ():
3478 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
3063 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -3483,9 +3068,9 @@ contexts:
3484 # arrow function possible to detect only with => on same line
3069 # arrow function possible to detect only with => on same line
3486− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
3071+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
3487− \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
3072+ \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
3488− (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
3073+ (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
3489 \s*=> # arrow operator
3074 \s*=> # arrow operator
@@ -3502,20 +3087,19 @@ contexts:
3505− (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
3090+ (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$))) |
3506− (:\s*((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
3091+ (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
3507− (:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
3508 ((async\s+)?(
3092 ((async\s+)?(
3509 (function\s*[(<*]) |
3093 (function\s*[(<*]) |
3510 (function\s+) |
3094 (function\s+) |
3511 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3095 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3513 ((async\s*)?(
3097 ((async\s*)?(
3514− ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
3098+ ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
3515 # sure shot arrow functions even if => is on new line
3099 # sure shot arrow functions even if => is on new line
3517− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
3101+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
3518− [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
3102+ [(]\s*
3520 ([)]\s*:) | # ():
3104 ([)]\s*:) | # ():
3521 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
3105 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -3526,37 +3110,34 @@ contexts:
3527 # arrow function possible to detect only with => on same line
3111 # arrow function possible to detect only with => on same line
3529− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
3113+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
3530− \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
3114+ \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
3531− (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
3115+ (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
3532 \s*=> # arrow operator
3116 \s*=> # arrow operator
3536 captures:
3120 captures:
3537 1: meta.definition.variable.tsx entity.name.function.tsx
3121 1: meta.definition.variable.tsx entity.name.function.tsx
3538− 2: keyword.operator.definiteassignment.tsx
3540 - meta_scope: meta.var-single-variable.expr.tsx
3123 - meta_scope: meta.var-single-variable.expr.tsx
3541− - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
3124+ - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
3542 pop: true
3125 pop: true
3543 - include: var-single-variable-type-annotation
3126 - include: var-single-variable-type-annotation
3544− - match: '([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])(\!)?'
3127+ - match: "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
3545 captures:
3128 captures:
3546 1: meta.definition.variable.tsx variable.other.constant.tsx
3129 1: meta.definition.variable.tsx variable.other.constant.tsx
3547− 2: keyword.operator.definiteassignment.tsx
3549 - meta_scope: meta.var-single-variable.expr.tsx
3131 - meta_scope: meta.var-single-variable.expr.tsx
3550− - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
3132+ - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
3551 pop: true
3133 pop: true
3552 - include: var-single-variable-type-annotation
3134 - include: var-single-variable-type-annotation
3553− - match: '([_$[:alpha:]][_$[:alnum:]]*)(\!)?'
3135+ - match: "([_$[:alpha:]][_$[:alnum:]]*)"
3554 captures:
3136 captures:
3555 1: meta.definition.variable.tsx variable.other.readwrite.tsx
3137 1: meta.definition.variable.tsx variable.other.readwrite.tsx
3556− 2: keyword.operator.definiteassignment.tsx
3558 - meta_scope: meta.var-single-variable.expr.tsx
3139 - meta_scope: meta.var-single-variable.expr.tsx
3559− - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
3140+ - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
3560 pop: true
3141 pop: true
3561 - include: var-single-variable-type-annotation
3142 - include: var-single-variable-type-annotation
3562 var-single-variable-type-annotation:
3143 var-single-variable-type-annotation:
@@ -3564,17 +3145,17 @@ contexts:
3564 - include: string
3145 - include: string
3565 - include: comment
3146 - include: comment
3566 variable-initializer:
3147 variable-initializer:
3567− - match: (?<!=|!)(=)(?!=)(?=\s*\S)(?!\s*.*=>\s*$)
3148+ - match: (?<!=|!)(=)(?!=)(?=\s*\S)
3568 captures:
3149 captures:
3569 1: keyword.operator.assignment.tsx
3150 1: keyword.operator.assignment.tsx
3571− - match: '(?=$|^|[,);}\]]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
3152+ - match: '(?=$|^|[,);}\]])'
3572 pop: true
3153 pop: true
3573 - include: expression
3154 - include: expression
3574 - match: (?<!=|!)(=)(?!=)
3155 - match: (?<!=|!)(=)(?!=)
3575 captures:
3156 captures:
3576 1: keyword.operator.assignment.tsx
3157 1: keyword.operator.assignment.tsx
3578− - match: '(?=[,);}\]]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))|(?=^\s*$)|(?<=\S)(?<!=)(?=\s*$)'
3159+ - match: '(?=[,);}\]])|(?=^\s*$)|(?<=\S)(?<!=)(?=\s*$)'
3579 pop: true
3160 pop: true
3580 - include: expression
3161 - include: expression