From bea8f581186bb8d933357599468dd7d862ae847b Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Sat, 21 Dec 2019 18:29:14 +0800 Subject: Add macro 2.0 support in parser --- crates/ra_parser/src/syntax_kind/generated.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'crates/ra_parser/src/syntax_kind') diff --git a/crates/ra_parser/src/syntax_kind/generated.rs b/crates/ra_parser/src/syntax_kind/generated.rs index fe0fcdb33..afe4ce51a 100644 --- a/crates/ra_parser/src/syntax_kind/generated.rs +++ b/crates/ra_parser/src/syntax_kind/generated.rs @@ -100,6 +100,7 @@ pub enum SyntaxKind { TRY_KW, BOX_KW, AWAIT_KW, + MACRO_KW, AUTO_KW, DEFAULT_KW, EXISTENTIAL_KW, @@ -136,6 +137,7 @@ pub enum SyntaxKind { TYPE_ALIAS_DEF, MACRO_CALL, TOKEN_TREE, + MACRO_DEF, PAREN_TYPE, TUPLE_TYPE, NEVER_TYPE, @@ -251,7 +253,7 @@ impl SyntaxKind { | SUPER_KW | IN_KW | WHERE_KW | FOR_KW | LOOP_KW | WHILE_KW | CONTINUE_KW | BREAK_KW | IF_KW | ELSE_KW | MATCH_KW | CONST_KW | STATIC_KW | MUT_KW | UNSAFE_KW | TYPE_KW | REF_KW | LET_KW | MOVE_KW | RETURN_KW | TRY_KW | BOX_KW | AWAIT_KW - | AUTO_KW | DEFAULT_KW | EXISTENTIAL_KW | UNION_KW => true, + | MACRO_KW | AUTO_KW | DEFAULT_KW | EXISTENTIAL_KW | UNION_KW => true, _ => false, } } @@ -314,6 +316,7 @@ impl SyntaxKind { "try" => TRY_KW, "box" => BOX_KW, "await" => AWAIT_KW, + "macro" => MACRO_KW, _ => return None, }; Some(kw) @@ -628,6 +631,9 @@ macro_rules! T { ( await ) => { $crate::SyntaxKind::AWAIT_KW }; + ( macro ) => { + $crate::SyntaxKind::MACRO_KW + }; ( auto ) => { $crate::SyntaxKind::AUTO_KW }; -- cgit v1.2.3