aboutsummaryrefslogtreecommitdiff
path: root/crates/parser/src/syntax_kind
diff options
context:
space:
mode:
Diffstat (limited to 'crates/parser/src/syntax_kind')
-rw-r--r--crates/parser/src/syntax_kind/generated.rs129
1 files changed, 23 insertions, 106 deletions
diff --git a/crates/parser/src/syntax_kind/generated.rs b/crates/parser/src/syntax_kind/generated.rs
index be2dfbbea..bcefd183a 100644
--- a/crates/parser/src/syntax_kind/generated.rs
+++ b/crates/parser/src/syntax_kind/generated.rs
@@ -260,116 +260,33 @@ pub enum SyntaxKind {
260use self::SyntaxKind::*; 260use self::SyntaxKind::*;
261impl SyntaxKind { 261impl SyntaxKind {
262 pub fn is_keyword(self) -> bool { 262 pub fn is_keyword(self) -> bool {
263 matches!( 263 match self {
264 self, 264 AS_KW | ASYNC_KW | AWAIT_KW | BOX_KW | BREAK_KW | CONST_KW | CONTINUE_KW | CRATE_KW
265 AS_KW 265 | DYN_KW | ELSE_KW | ENUM_KW | EXTERN_KW | FALSE_KW | FN_KW | FOR_KW | IF_KW
266 | ASYNC_KW 266 | IMPL_KW | IN_KW | LET_KW | LOOP_KW | MACRO_KW | MATCH_KW | MOD_KW | MOVE_KW
267 | AWAIT_KW 267 | MUT_KW | PUB_KW | REF_KW | RETURN_KW | SELF_KW | STATIC_KW | STRUCT_KW | SUPER_KW
268 | BOX_KW 268 | TRAIT_KW | TRUE_KW | TRY_KW | TYPE_KW | UNSAFE_KW | USE_KW | WHERE_KW | WHILE_KW
269 | BREAK_KW 269 | YIELD_KW | AUTO_KW | DEFAULT_KW | EXISTENTIAL_KW | UNION_KW | RAW_KW
270 | CONST_KW 270 | MACRO_RULES_KW => true,
271 | CONTINUE_KW 271 _ => false,
272 | CRATE_KW 272 }
273 | DYN_KW
274 | ELSE_KW
275 | ENUM_KW
276 | EXTERN_KW
277 | FALSE_KW
278 | FN_KW
279 | FOR_KW
280 | IF_KW
281 | IMPL_KW
282 | IN_KW
283 | LET_KW
284 | LOOP_KW
285 | MACRO_KW
286 | MATCH_KW
287 | MOD_KW
288 | MOVE_KW
289 | MUT_KW
290 | PUB_KW
291 | REF_KW
292 | RETURN_KW
293 | SELF_KW
294 | STATIC_KW
295 | STRUCT_KW
296 | SUPER_KW
297 | TRAIT_KW
298 | TRUE_KW
299 | TRY_KW
300 | TYPE_KW
301 | UNSAFE_KW
302 | USE_KW
303 | WHERE_KW
304 | WHILE_KW
305 | YIELD_KW
306 | AUTO_KW
307 | DEFAULT_KW
308 | EXISTENTIAL_KW
309 | UNION_KW
310 | RAW_KW
311 | MACRO_RULES_KW
312 )
313 } 273 }
314 pub fn is_punct(self) -> bool { 274 pub fn is_punct(self) -> bool {
315 matches!( 275 match self {
316 self, 276 SEMICOLON | COMMA | L_PAREN | R_PAREN | L_CURLY | R_CURLY | L_BRACK | R_BRACK
317 SEMICOLON 277 | L_ANGLE | R_ANGLE | AT | POUND | TILDE | QUESTION | DOLLAR | AMP | PIPE | PLUS
318 | COMMA 278 | STAR | SLASH | CARET | PERCENT | UNDERSCORE | DOT | DOT2 | DOT3 | DOT2EQ | COLON
319 | L_PAREN 279 | COLON2 | EQ | EQ2 | FAT_ARROW | BANG | NEQ | MINUS | THIN_ARROW | LTEQ | GTEQ
320 | R_PAREN 280 | PLUSEQ | MINUSEQ | PIPEEQ | AMPEQ | CARETEQ | SLASHEQ | STAREQ | PERCENTEQ | AMP2
321 | L_CURLY 281 | PIPE2 | SHL | SHR | SHLEQ | SHREQ => true,
322 | R_CURLY 282 _ => false,
323 | L_BRACK 283 }
324 | R_BRACK
325 | L_ANGLE
326 | R_ANGLE
327 | AT
328 | POUND
329 | TILDE
330 | QUESTION
331 | DOLLAR
332 | AMP
333 | PIPE
334 | PLUS
335 | STAR
336 | SLASH
337 | CARET
338 | PERCENT
339 | UNDERSCORE
340 | DOT
341 | DOT2
342 | DOT3
343 | DOT2EQ
344 | COLON
345 | COLON2
346 | EQ
347 | EQ2
348 | FAT_ARROW
349 | BANG
350 | NEQ
351 | MINUS
352 | THIN_ARROW
353 | LTEQ
354 | GTEQ
355 | PLUSEQ
356 | MINUSEQ
357 | PIPEEQ
358 | AMPEQ
359 | CARETEQ
360 | SLASHEQ
361 | STAREQ
362 | PERCENTEQ
363 | AMP2
364 | PIPE2
365 | SHL
366 | SHR
367 | SHLEQ
368 | SHREQ
369 )
370 } 284 }
371 pub fn is_literal(self) -> bool { 285 pub fn is_literal(self) -> bool {
372 matches!(self, INT_NUMBER | FLOAT_NUMBER | CHAR | BYTE | STRING | BYTE_STRING) 286 match self {
287 INT_NUMBER | FLOAT_NUMBER | CHAR | BYTE | STRING | BYTE_STRING => true,
288 _ => false,
289 }
373 } 290 }
374 pub fn from_keyword(ident: &str) -> Option<SyntaxKind> { 291 pub fn from_keyword(ident: &str) -> Option<SyntaxKind> {
375 let kw = match ident { 292 let kw = match ident {