Skip to content

Commit 87dc78d

Browse files
committed
languages: Separate control flow keywords for js/ts/tsx
1 parent a960db6 commit 87dc78d

File tree

3 files changed

+54
-45
lines changed

3 files changed

+54
-45
lines changed

crates/languages/src/javascript/highlights.scm

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -171,47 +171,50 @@
171171
"as"
172172
"async"
173173
"await"
174-
"break"
175-
"case"
176-
"catch"
177174
"class"
178175
"const"
179-
"continue"
180176
"debugger"
181177
"default"
182178
"delete"
183-
"do"
184-
"else"
185179
"export"
186180
"extends"
187-
"finally"
188-
"for"
189181
"from"
190182
"function"
191183
"get"
192-
"if"
193184
"import"
194185
"in"
195186
"instanceof"
196187
"let"
197188
"new"
198189
"of"
199-
"return"
200190
"set"
201191
"static"
202-
"switch"
203192
"target"
204-
"throw"
205-
"try"
206193
"typeof"
207194
"using"
208195
"var"
209196
"void"
210-
"while"
211197
"with"
212-
"yield"
213198
] @keyword
214199

200+
[
201+
"break"
202+
"case"
203+
"catch"
204+
"continue"
205+
"do"
206+
"else"
207+
"finally"
208+
"for"
209+
"if"
210+
"return"
211+
"switch"
212+
"throw"
213+
"try"
214+
"while"
215+
"yield"
216+
] @keyword.control
217+
215218
(template_substitution
216219
"${" @punctuation.special
217220
"}" @punctuation.special) @embedded

crates/languages/src/tsx/highlights.scm

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -171,49 +171,52 @@
171171
"as"
172172
"async"
173173
"await"
174-
"break"
175-
"case"
176-
"catch"
177174
"class"
178175
"const"
179-
"continue"
180176
"debugger"
181177
"default"
182178
"delete"
183-
"do"
184-
"else"
185179
"export"
186180
"extends"
187-
"finally"
188-
"for"
189181
"from"
190182
"function"
191183
"get"
192-
"if"
193184
"import"
194185
"in"
195186
"instanceof"
196187
"is"
197188
"let"
198189
"new"
199190
"of"
200-
"return"
201191
"satisfies"
202192
"set"
203193
"static"
204-
"switch"
205194
"target"
206-
"throw"
207-
"try"
208195
"typeof"
209196
"using"
210197
"var"
211198
"void"
212-
"while"
213199
"with"
214-
"yield"
215200
] @keyword
216201

202+
[
203+
"break"
204+
"case"
205+
"catch"
206+
"continue"
207+
"do"
208+
"else"
209+
"finally"
210+
"for"
211+
"if"
212+
"return"
213+
"switch"
214+
"throw"
215+
"try"
216+
"while"
217+
"yield"
218+
] @keyword.control
219+
217220
(template_substitution
218221
"${" @punctuation.special
219222
"}" @punctuation.special) @embedded

crates/languages/src/typescript/highlights.scm

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -218,27 +218,18 @@
218218
"as"
219219
"async"
220220
"await"
221-
"break"
222-
"case"
223-
"catch"
224221
"class"
225222
"const"
226-
"continue"
227223
"debugger"
228224
"declare"
229225
"default"
230226
"delete"
231-
"do"
232-
"else"
233227
"enum"
234228
"export"
235229
"extends"
236-
"finally"
237-
"for"
238230
"from"
239231
"function"
240232
"get"
241-
"if"
242233
"implements"
243234
"import"
244235
"in"
@@ -257,20 +248,32 @@
257248
"protected"
258249
"public"
259250
"readonly"
260-
"return"
261251
"satisfies"
262252
"set"
263253
"static"
264-
"switch"
265254
"target"
266-
"throw"
267-
"try"
268255
"type"
269256
"typeof"
270257
"using"
271258
"var"
272259
"void"
273-
"while"
274260
"with"
275-
"yield"
276261
] @keyword
262+
263+
[
264+
"break"
265+
"case"
266+
"catch"
267+
"continue"
268+
"do"
269+
"else"
270+
"finally"
271+
"for"
272+
"if"
273+
"return"
274+
"switch"
275+
"throw"
276+
"try"
277+
"while"
278+
"yield"
279+
] @keyword.control

0 commit comments

Comments
 (0)