Skip to content

Commit 95c0e02

Browse files
committed
CR feedback
1 parent 1954c96 commit 95c0e02

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

TypeScript.YAML-tmLanguage

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ repository:
2121

2222
control-statement:
2323
name: keyword.control.ts
24-
match: \b(break|catch|continue|declare|do|else|finally|for|if|return|switch|throw|try|while)\b
24+
match: \b(break|catch|continue|declare|do|else|finally|for|if|return|switch|throw|try|while|with|super)\b
2525

2626
switch-case:
2727
name: case.expr.ts
@@ -332,6 +332,7 @@ repository:
332332
expression:
333333
name: meta.expression.ts
334334
patterns:
335+
- include: '#for-in-simple'
335336
- include: '#string'
336337
- include: '#regex'
337338
- include: '#template'
@@ -351,11 +352,10 @@ repository:
351352
- include: '#storage-keyword'
352353
- include: '#control-statement'
353354
- include: '#switch-case'
354-
- include: '#for-in-simple'
355355

356356
for-in-simple:
357357
name: forin.expr.ts
358-
match: (?<=\()\s*\b(var|let|const)\s+([a-zA-Z_$][\w$]*)\s+(in)\b
358+
match: (?<=\()\s*\b(var|let|const)\s+([a-zA-Z_$][\w$]*)\s+(in|of)\b
359359
captures:
360360
'1': { name: storage.type.ts }
361361
'3': { name: keyword.operator.ts }
@@ -394,7 +394,7 @@ repository:
394394

395395
expression-operator:
396396
name: keyword.operator.ts
397-
match: =>|\b(delete|export|import|in|of|instanceof|module|new|typeof|void)\b
397+
match: =>|\b(delete|export|import|in|instanceof|module|new|typeof|void)\b
398398

399399
arithmetic-operator:
400400
name: keyword.operator.arithmetic.ts

TypeScript.tmLanguage

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
<key>control-statement</key>
194194
<dict>
195195
<key>match</key>
196-
<string>\b(break|catch|continue|declare|do|else|finally|for|if|return|switch|throw|try|while)\b</string>
196+
<string>\b(break|catch|continue|declare|do|else|finally|for|if|return|switch|throw|try|while|with|super)\b</string>
197197
<key>name</key>
198198
<string>keyword.control.ts</string>
199199
</dict>
@@ -284,6 +284,10 @@
284284
<string>meta.expression.ts</string>
285285
<key>patterns</key>
286286
<array>
287+
<dict>
288+
<key>include</key>
289+
<string>#for-in-simple</string>
290+
</dict>
287291
<dict>
288292
<key>include</key>
289293
<string>#string</string>
@@ -360,16 +364,12 @@
360364
<key>include</key>
361365
<string>#switch-case</string>
362366
</dict>
363-
<dict>
364-
<key>include</key>
365-
<string>#for-in-simple</string>
366-
</dict>
367367
</array>
368368
</dict>
369369
<key>expression-operator</key>
370370
<dict>
371371
<key>match</key>
372-
<string>=&gt;|\b(delete|export|import|in|of|instanceof|module|new|typeof|void)\b</string>
372+
<string>=&gt;|\b(delete|export|import|in|instanceof|module|new|typeof|void)\b</string>
373373
<key>name</key>
374374
<string>keyword.operator.ts</string>
375375
</dict>
@@ -418,7 +418,7 @@
418418
</dict>
419419
</dict>
420420
<key>match</key>
421-
<string>(?&lt;=\()\s*\b(var|let|const)\s+([a-zA-Z_$][\w$]*)\s+(in)\b</string>
421+
<string>(?&lt;=\()\s*\b(var|let|const)\s+([a-zA-Z_$][\w$]*)\s+(in|of)\b</string>
422422
<key>name</key>
423423
<string>forin.expr.ts</string>
424424
</dict>

0 commit comments

Comments
 (0)