aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-01-03 19:37:02 +0000
committerAleksey Kladov <[email protected]>2020-01-03 20:54:10 +0000
commit084bd304f304e674fc3d5b132daf8a9f975064c9 (patch)
tree1715adcc8ef9cb9bc48e73e6708f9452854c947f /crates/ra_parser/src
parent67922a029a42e11a76711f9a2c71ca542973042c (diff)
Switch ast declaration from ron to a macro
Diffstat (limited to 'crates/ra_parser/src')
-rw-r--r--crates/ra_parser/src/syntax_kind/generated.rs270
1 files changed, 135 insertions, 135 deletions
diff --git a/crates/ra_parser/src/syntax_kind/generated.rs b/crates/ra_parser/src/syntax_kind/generated.rs
index af2945f57..262c545e4 100644
--- a/crates/ra_parser/src/syntax_kind/generated.rs
+++ b/crates/ra_parser/src/syntax_kind/generated.rs
@@ -61,46 +61,46 @@ pub enum SyntaxKind {
61 SHR, 61 SHR,
62 SHLEQ, 62 SHLEQ,
63 SHREQ, 63 SHREQ,
64 AS_KW,
64 ASYNC_KW, 65 ASYNC_KW,
65 USE_KW, 66 AWAIT_KW,
66 FN_KW, 67 BOX_KW,
67 STRUCT_KW, 68 BREAK_KW,
68 ENUM_KW, 69 CONST_KW,
69 TRAIT_KW, 70 CONTINUE_KW,
70 IMPL_KW, 71 CRATE_KW,
71 DYN_KW, 72 DYN_KW,
72 TRUE_KW, 73 ELSE_KW,
73 FALSE_KW, 74 ENUM_KW,
74 AS_KW,
75 EXTERN_KW, 75 EXTERN_KW,
76 CRATE_KW, 76 FALSE_KW,
77 MOD_KW, 77 FN_KW,
78 PUB_KW,
79 SELF_KW,
80 SUPER_KW,
81 IN_KW,
82 WHERE_KW,
83 FOR_KW, 78 FOR_KW,
84 LOOP_KW,
85 WHILE_KW,
86 CONTINUE_KW,
87 BREAK_KW,
88 IF_KW, 79 IF_KW,
89 ELSE_KW, 80 IMPL_KW,
81 IN_KW,
82 LET_KW,
83 LOOP_KW,
84 MACRO_KW,
90 MATCH_KW, 85 MATCH_KW,
91 CONST_KW, 86 MOD_KW,
92 STATIC_KW, 87 MOVE_KW,
93 MUT_KW, 88 MUT_KW,
94 UNSAFE_KW, 89 PUB_KW,
95 TYPE_KW,
96 REF_KW, 90 REF_KW,
97 LET_KW,
98 MOVE_KW,
99 RETURN_KW, 91 RETURN_KW,
92 SELF_KW,
93 STATIC_KW,
94 STRUCT_KW,
95 SUPER_KW,
96 TRAIT_KW,
97 TRUE_KW,
100 TRY_KW, 98 TRY_KW,
101 BOX_KW, 99 TYPE_KW,
102 AWAIT_KW, 100 UNSAFE_KW,
103 MACRO_KW, 101 USE_KW,
102 WHERE_KW,
103 WHILE_KW,
104 AUTO_KW, 104 AUTO_KW,
105 DEFAULT_KW, 105 DEFAULT_KW,
106 EXISTENTIAL_KW, 106 EXISTENTIAL_KW,
@@ -249,12 +249,12 @@ use self::SyntaxKind::*;
249impl SyntaxKind { 249impl SyntaxKind {
250 pub fn is_keyword(self) -> bool { 250 pub fn is_keyword(self) -> bool {
251 match self { 251 match self {
252 ASYNC_KW | USE_KW | FN_KW | STRUCT_KW | ENUM_KW | TRAIT_KW | IMPL_KW | DYN_KW 252 AS_KW | ASYNC_KW | AWAIT_KW | BOX_KW | BREAK_KW | CONST_KW | CONTINUE_KW | CRATE_KW
253 | TRUE_KW | FALSE_KW | AS_KW | EXTERN_KW | CRATE_KW | MOD_KW | PUB_KW | SELF_KW 253 | DYN_KW | ELSE_KW | ENUM_KW | EXTERN_KW | FALSE_KW | FN_KW | FOR_KW | IF_KW
254 | SUPER_KW | IN_KW | WHERE_KW | FOR_KW | LOOP_KW | WHILE_KW | CONTINUE_KW 254 | IMPL_KW | IN_KW | LET_KW | LOOP_KW | MACRO_KW | MATCH_KW | MOD_KW | MOVE_KW
255 | BREAK_KW | IF_KW | ELSE_KW | MATCH_KW | CONST_KW | STATIC_KW | MUT_KW | UNSAFE_KW 255 | MUT_KW | PUB_KW | REF_KW | RETURN_KW | SELF_KW | STATIC_KW | STRUCT_KW | SUPER_KW
256 | TYPE_KW | REF_KW | LET_KW | MOVE_KW | RETURN_KW | TRY_KW | BOX_KW | AWAIT_KW 256 | TRAIT_KW | TRUE_KW | TRY_KW | TYPE_KW | UNSAFE_KW | USE_KW | WHERE_KW | WHILE_KW
257 | MACRO_KW | AUTO_KW | DEFAULT_KW | EXISTENTIAL_KW | UNION_KW => true, 257 | AUTO_KW | DEFAULT_KW | EXISTENTIAL_KW | UNION_KW => true,
258 _ => false, 258 _ => false,
259 } 259 }
260 } 260 }
@@ -278,46 +278,46 @@ impl SyntaxKind {
278 } 278 }
279 pub fn from_keyword(ident: &str) -> Option<SyntaxKind> { 279 pub fn from_keyword(ident: &str) -> Option<SyntaxKind> {
280 let kw = match ident { 280 let kw = match ident {
281 "as" => AS_KW,
281 "async" => ASYNC_KW, 282 "async" => ASYNC_KW,
282 "use" => USE_KW, 283 "await" => AWAIT_KW,
283 "fn" => FN_KW, 284 "box" => BOX_KW,
284 "struct" => STRUCT_KW, 285 "break" => BREAK_KW,
285 "enum" => ENUM_KW, 286 "const" => CONST_KW,
286 "trait" => TRAIT_KW, 287 "continue" => CONTINUE_KW,
287 "impl" => IMPL_KW, 288 "crate" => CRATE_KW,
288 "dyn" => DYN_KW, 289 "dyn" => DYN_KW,
289 "true" => TRUE_KW, 290 "else" => ELSE_KW,
290 "false" => FALSE_KW, 291 "enum" => ENUM_KW,
291 "as" => AS_KW,
292 "extern" => EXTERN_KW, 292 "extern" => EXTERN_KW,
293 "crate" => CRATE_KW, 293 "false" => FALSE_KW,
294 "mod" => MOD_KW, 294 "fn" => FN_KW,
295 "pub" => PUB_KW,
296 "self" => SELF_KW,
297 "super" => SUPER_KW,
298 "in" => IN_KW,
299 "where" => WHERE_KW,
300 "for" => FOR_KW, 295 "for" => FOR_KW,
301 "loop" => LOOP_KW,
302 "while" => WHILE_KW,
303 "continue" => CONTINUE_KW,
304 "break" => BREAK_KW,
305 "if" => IF_KW, 296 "if" => IF_KW,
306 "else" => ELSE_KW, 297 "impl" => IMPL_KW,
298 "in" => IN_KW,
299 "let" => LET_KW,
300 "loop" => LOOP_KW,
301 "macro" => MACRO_KW,
307 "match" => MATCH_KW, 302 "match" => MATCH_KW,
308 "const" => CONST_KW, 303 "mod" => MOD_KW,
309 "static" => STATIC_KW, 304 "move" => MOVE_KW,
310 "mut" => MUT_KW, 305 "mut" => MUT_KW,
311 "unsafe" => UNSAFE_KW, 306 "pub" => PUB_KW,
312 "type" => TYPE_KW,
313 "ref" => REF_KW, 307 "ref" => REF_KW,
314 "let" => LET_KW,
315 "move" => MOVE_KW,
316 "return" => RETURN_KW, 308 "return" => RETURN_KW,
309 "self" => SELF_KW,
310 "static" => STATIC_KW,
311 "struct" => STRUCT_KW,
312 "super" => SUPER_KW,
313 "trait" => TRAIT_KW,
314 "true" => TRUE_KW,
317 "try" => TRY_KW, 315 "try" => TRY_KW,
318 "box" => BOX_KW, 316 "type" => TYPE_KW,
319 "await" => AWAIT_KW, 317 "unsafe" => UNSAFE_KW,
320 "macro" => MACRO_KW, 318 "use" => USE_KW,
319 "where" => WHERE_KW,
320 "while" => WHILE_KW,
321 _ => return None, 321 _ => return None,
322 }; 322 };
323 Some(kw) 323 Some(kw)
@@ -515,125 +515,125 @@ macro_rules! T {
515 ( >>= ) => { 515 ( >>= ) => {
516 $crate::SyntaxKind::SHREQ 516 $crate::SyntaxKind::SHREQ
517 }; 517 };
518 ( as ) => {
519 $crate::SyntaxKind::AS_KW
520 };
518 ( async ) => { 521 ( async ) => {
519 $crate::SyntaxKind::ASYNC_KW 522 $crate::SyntaxKind::ASYNC_KW
520 }; 523 };
521 ( use ) => { 524 ( await ) => {
522 $crate::SyntaxKind::USE_KW 525 $crate::SyntaxKind::AWAIT_KW
523 }; 526 };
524 ( fn ) => { 527 ( box ) => {
525 $crate::SyntaxKind::FN_KW 528 $crate::SyntaxKind::BOX_KW
526 }; 529 };
527 ( struct ) => { 530 ( break ) => {
528 $crate::SyntaxKind::STRUCT_KW 531 $crate::SyntaxKind::BREAK_KW
529 }; 532 };
530 ( enum ) => { 533 ( const ) => {
531 $crate::SyntaxKind::ENUM_KW 534 $crate::SyntaxKind::CONST_KW
532 }; 535 };
533 ( trait ) => { 536 ( continue ) => {
534 $crate::SyntaxKind::TRAIT_KW 537 $crate::SyntaxKind::CONTINUE_KW
535 }; 538 };
536 ( impl ) => { 539 ( crate ) => {
537 $crate::SyntaxKind::IMPL_KW 540 $crate::SyntaxKind::CRATE_KW
538 }; 541 };
539 ( dyn ) => { 542 ( dyn ) => {
540 $crate::SyntaxKind::DYN_KW 543 $crate::SyntaxKind::DYN_KW
541 }; 544 };
542 ( true ) => { 545 ( else ) => {
543 $crate::SyntaxKind::TRUE_KW 546 $crate::SyntaxKind::ELSE_KW
544 };
545 ( false ) => {
546 $crate::SyntaxKind::FALSE_KW
547 }; 547 };
548 ( as ) => { 548 ( enum ) => {
549 $crate::SyntaxKind::AS_KW 549 $crate::SyntaxKind::ENUM_KW
550 }; 550 };
551 ( extern ) => { 551 ( extern ) => {
552 $crate::SyntaxKind::EXTERN_KW 552 $crate::SyntaxKind::EXTERN_KW
553 }; 553 };
554 ( crate ) => { 554 ( false ) => {
555 $crate::SyntaxKind::CRATE_KW 555 $crate::SyntaxKind::FALSE_KW
556 }; 556 };
557 ( mod ) => { 557 ( fn ) => {
558 $crate::SyntaxKind::MOD_KW 558 $crate::SyntaxKind::FN_KW
559 }; 559 };
560 ( pub ) => { 560 ( for ) => {
561 $crate::SyntaxKind::PUB_KW 561 $crate::SyntaxKind::FOR_KW
562 }; 562 };
563 ( self ) => { 563 ( if ) => {
564 $crate::SyntaxKind::SELF_KW 564 $crate::SyntaxKind::IF_KW
565 }; 565 };
566 ( super ) => { 566 ( impl ) => {
567 $crate::SyntaxKind::SUPER_KW 567 $crate::SyntaxKind::IMPL_KW
568 }; 568 };
569 ( in ) => { 569 ( in ) => {
570 $crate::SyntaxKind::IN_KW 570 $crate::SyntaxKind::IN_KW
571 }; 571 };
572 ( where ) => { 572 ( let ) => {
573 $crate::SyntaxKind::WHERE_KW 573 $crate::SyntaxKind::LET_KW
574 };
575 ( for ) => {
576 $crate::SyntaxKind::FOR_KW
577 }; 574 };
578 ( loop ) => { 575 ( loop ) => {
579 $crate::SyntaxKind::LOOP_KW 576 $crate::SyntaxKind::LOOP_KW
580 }; 577 };
581 ( while ) => { 578 ( macro ) => {
582 $crate::SyntaxKind::WHILE_KW 579 $crate::SyntaxKind::MACRO_KW
583 };
584 ( continue ) => {
585 $crate::SyntaxKind::CONTINUE_KW
586 };
587 ( break ) => {
588 $crate::SyntaxKind::BREAK_KW
589 };
590 ( if ) => {
591 $crate::SyntaxKind::IF_KW
592 };
593 ( else ) => {
594 $crate::SyntaxKind::ELSE_KW
595 }; 580 };
596 ( match ) => { 581 ( match ) => {
597 $crate::SyntaxKind::MATCH_KW 582 $crate::SyntaxKind::MATCH_KW
598 }; 583 };
599 ( const ) => { 584 ( mod ) => {
600 $crate::SyntaxKind::CONST_KW 585 $crate::SyntaxKind::MOD_KW
601 }; 586 };
602 ( static ) => { 587 ( move ) => {
603 $crate::SyntaxKind::STATIC_KW 588 $crate::SyntaxKind::MOVE_KW
604 }; 589 };
605 ( mut ) => { 590 ( mut ) => {
606 $crate::SyntaxKind::MUT_KW 591 $crate::SyntaxKind::MUT_KW
607 }; 592 };
608 ( unsafe ) => { 593 ( pub ) => {
609 $crate::SyntaxKind::UNSAFE_KW 594 $crate::SyntaxKind::PUB_KW
610 };
611 ( type ) => {
612 $crate::SyntaxKind::TYPE_KW
613 }; 595 };
614 ( ref ) => { 596 ( ref ) => {
615 $crate::SyntaxKind::REF_KW 597 $crate::SyntaxKind::REF_KW
616 }; 598 };
617 ( let ) => {
618 $crate::SyntaxKind::LET_KW
619 };
620 ( move ) => {
621 $crate::SyntaxKind::MOVE_KW
622 };
623 ( return ) => { 599 ( return ) => {
624 $crate::SyntaxKind::RETURN_KW 600 $crate::SyntaxKind::RETURN_KW
625 }; 601 };
602 ( self ) => {
603 $crate::SyntaxKind::SELF_KW
604 };
605 ( static ) => {
606 $crate::SyntaxKind::STATIC_KW
607 };
608 ( struct ) => {
609 $crate::SyntaxKind::STRUCT_KW
610 };
611 ( super ) => {
612 $crate::SyntaxKind::SUPER_KW
613 };
614 ( trait ) => {
615 $crate::SyntaxKind::TRAIT_KW
616 };
617 ( true ) => {
618 $crate::SyntaxKind::TRUE_KW
619 };
626 ( try ) => { 620 ( try ) => {
627 $crate::SyntaxKind::TRY_KW 621 $crate::SyntaxKind::TRY_KW
628 }; 622 };
629 ( box ) => { 623 ( type ) => {
630 $crate::SyntaxKind::BOX_KW 624 $crate::SyntaxKind::TYPE_KW
631 }; 625 };
632 ( await ) => { 626 ( unsafe ) => {
633 $crate::SyntaxKind::AWAIT_KW 627 $crate::SyntaxKind::UNSAFE_KW
634 }; 628 };
635 ( macro ) => { 629 ( use ) => {
636 $crate::SyntaxKind::MACRO_KW 630 $crate::SyntaxKind::USE_KW
631 };
632 ( where ) => {
633 $crate::SyntaxKind::WHERE_KW
634 };
635 ( while ) => {
636 $crate::SyntaxKind::WHILE_KW
637 }; 637 };
638 ( auto ) => { 638 ( auto ) => {
639 $crate::SyntaxKind::AUTO_KW 639 $crate::SyntaxKind::AUTO_KW