@@ -249,7 +249,7 @@ repository:
249
249
# let/var
250
250
- name : meta.var.expr.ts
251
251
begin : (?={{varExprStart}})
252
- end : (?!{{varExprStart}})((?=;|}|(\s+ (of|in)\s+)|^\s*$|{{endOfStatement}})|((?<!{{lookBehindLet}}|{{lookBehindVar}})(?=\s*$)))
252
+ end : (?!{{varExprStart}})((?=;|}|({{startOfIdentifier}} (of|in)\s+)|^\s*$|{{endOfStatement}})|((?<!{{lookBehindLet}}|{{lookBehindVar}})(?=\s*$)))
253
253
patterns :
254
254
- begin : ' {{varExprStart}}\s*'
255
255
beginCaptures :
@@ -264,7 +264,7 @@ repository:
264
264
- begin : (,)\s*((?!\S)|(?=\/\/))
265
265
beginCaptures :
266
266
' 1 ' : { name: punctuation.separator.comma.ts }
267
- end : (?<!,)(((?==|;|}|(\s+ (of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))
267
+ end : (?<!,)(((?==|;|}|({{startOfIdentifier}} (of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))
268
268
patterns :
269
269
- include : ' #single-line-comment-consuming-line-ending'
270
270
- include : ' #comment'
@@ -279,7 +279,7 @@ repository:
279
279
' 1 ' : { name: keyword.control.export.ts }
280
280
' 2 ' : { name: storage.modifier.ts }
281
281
' 3 ' : { name: storage.type.ts }
282
- end : (?!{{constExprStart}})((?=;|}|(\s+ (of|in)\s+)|^\s*$|{{endOfStatement}})|((?<!{{lookBehindConst}})(?=\s*$)))
282
+ end : (?!{{constExprStart}})((?=;|}|({{startOfIdentifier}} (of|in)\s+)|^\s*$|{{endOfStatement}})|((?<!{{lookBehindConst}})(?=\s*$)))
283
283
patterns :
284
284
- begin : ' {{constExprStart}}\s*'
285
285
beginCaptures :
@@ -294,7 +294,7 @@ repository:
294
294
- begin : (,)\s*((?!\S)|(?=\/\/))
295
295
beginCaptures :
296
296
' 1 ' : { name: punctuation.separator.comma.ts }
297
- end : (?<!,)(((?==|;|}|(\s+ (of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))
297
+ end : (?<!,)(((?==|;|}|({{startOfIdentifier}} (of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))
298
298
patterns :
299
299
- include : ' #single-line-comment-consuming-line-ending'
300
300
- include : ' #comment'
@@ -311,23 +311,23 @@ repository:
311
311
beginCaptures :
312
312
' 1 ' : { name: meta.definition.variable.ts entity.name.function.ts }
313
313
' 2 ' : { name: keyword.operator.definiteassignment.ts }
314
- end : (?=$|^|[;,=}]|(\s+ (of|in)\s+))
314
+ end : (?=$|^|[;,=}]|({{startOfIdentifier}} (of|in)\s+))
315
315
patterns :
316
316
- include : ' #var-single-variable-type-annotation'
317
317
- name : meta.var-single-variable.expr.ts
318
318
begin : ' {{constantVar}}(\!)?'
319
319
beginCaptures :
320
320
' 1 ' : { name: meta.definition.variable.ts variable.other.constant.ts }
321
321
' 2 ' : { name: keyword.operator.definiteassignment.ts }
322
- end : (?=$|^|[;,=}]|(\s+ (of|in)\s+))
322
+ end : (?=$|^|[;,=}]|({{startOfIdentifier}} (of|in)\s+))
323
323
patterns :
324
324
- include : ' #var-single-variable-type-annotation'
325
325
- name : meta.var-single-variable.expr.ts
326
326
begin : ({{identifier}})(\!)?
327
327
beginCaptures :
328
328
' 1 ' : { name: meta.definition.variable.ts variable.other.readwrite.ts }
329
329
' 2 ' : { name: keyword.operator.definiteassignment.ts }
330
- end : (?=$|^|[;,=}]|(\s+ (of|in)\s+))
330
+ end : (?=$|^|[;,=}]|({{startOfIdentifier}} (of|in)\s+))
331
331
patterns :
332
332
- include : ' #var-single-variable-type-annotation'
333
333
@@ -338,14 +338,14 @@ repository:
338
338
(?x)({{identifier}})(?={{functionLikeAssignmentOrType}})
339
339
beginCaptures :
340
340
' 1 ' : { name: meta.definition.variable.ts variable.other.constant.ts entity.name.function.ts }
341
- end : (?=$|^|[;,=}]|(\s+ (of|in)\s+))
341
+ end : (?=$|^|[;,=}]|({{startOfIdentifier}} (of|in)\s+))
342
342
patterns :
343
343
- include : ' #var-single-variable-type-annotation'
344
344
- name : meta.var-single-variable.expr.ts
345
345
begin : ({{identifier}})
346
346
beginCaptures :
347
347
' 1 ' : { name: meta.definition.variable.ts variable.other.constant.ts }
348
- end : (?=$|^|[;,=}]|(\s+ (of|in)\s+))
348
+ end : (?=$|^|[;,=}]|({{startOfIdentifier}} (of|in)\s+))
349
349
patterns :
350
350
- include : ' #var-single-variable-type-annotation'
351
351
@@ -359,14 +359,14 @@ repository:
359
359
patterns :
360
360
- name : meta.object-binding-pattern-variable.ts
361
361
begin : (?<!=|:|{{lookBehindOf}}|{{lookBehindIn}})\s*(?=\{)
362
- end : (?=$|^|[;,=}]|(\s+ (of|in)\s+))
362
+ end : (?=$|^|[;,=}]|({{startOfIdentifier}} (of|in)\s+))
363
363
patterns :
364
364
- include : ' #object-binding-pattern'
365
365
- include : ' #type-annotation'
366
366
- include : ' #comment'
367
367
- name : meta.array-binding-pattern-variable.ts
368
368
begin : (?<!=|:|{{lookBehindOf}}|{{lookBehindIn}})\s*(?=\[)
369
- end : (?=$|^|[;,=}]|(\s+ (of|in)\s+))
369
+ end : (?=$|^|[;,=}]|({{startOfIdentifier}} (of|in)\s+))
370
370
patterns :
371
371
- include : ' #array-binding-pattern'
372
372
- include : ' #type-annotation'
@@ -376,14 +376,14 @@ repository:
376
376
patterns :
377
377
- name : meta.object-binding-pattern-variable.ts
378
378
begin : (?<!=|:|{{lookBehindOf}}|{{lookBehindIn}})\s*(?=\{)
379
- end : (?=$|^|[;,=}]|(\s+ (of|in)\s+))
379
+ end : (?=$|^|[;,=}]|({{startOfIdentifier}} (of|in)\s+))
380
380
patterns :
381
381
- include : ' #object-binding-pattern-const'
382
382
- include : ' #type-annotation'
383
383
- include : ' #comment'
384
384
- name : meta.array-binding-pattern-variable.ts
385
385
begin : (?<!=|:|{{lookBehindOf}}|{{lookBehindIn}})\s*(?=\[)
386
- end : (?=$|^|[;,=}]|(\s+ (of|in)\s+))
386
+ end : (?=$|^|[;,=}]|({{startOfIdentifier}} (of|in)\s+))
387
387
patterns :
388
388
- include : ' #array-binding-pattern-const'
389
389
- include : ' #type-annotation'
@@ -642,14 +642,14 @@ repository:
642
642
- begin : (?<!=|!)(=)(?!=)(?=\s*\S)(?!\s*.*=>\s*$)
643
643
beginCaptures :
644
644
' 1 ' : { name: keyword.operator.assignment.ts }
645
- end : (?=$|^|[,);}\]]|(\s+ (of|in)\s+))
645
+ end : (?=$|^|[,);}\]]|({{startOfIdentifier}} (of|in)\s+))
646
646
patterns :
647
647
- include : ' #expression'
648
648
# if the expression doesnt start on same line do not use end of line as end of unless the complete line is blank
649
649
- begin : (?<!=|!)(=)(?!=)
650
650
beginCaptures :
651
651
' 1 ' : { name: keyword.operator.assignment.ts }
652
- end : (?=[,);}\]]|(\s+ (of|in)\s+))|(?=^\s*$)|(?<=\S)(?<!=)(?=\s*$)
652
+ end : (?=[,);}\]]|({{startOfIdentifier}} (of|in)\s+))|(?=^\s*$)|(?<=\S)(?<!=)(?=\s*$)
653
653
patterns :
654
654
- include : ' #expression'
655
655
0 commit comments