From 406505e096b4e6626ba8eb6c035671783ed2a577 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 28 Dec 2018 16:59:58 +0300 Subject: super simplistic macro expansion --- crates/ra_syntax/src/ast/generated.rs | 4 ++++ crates/ra_syntax/src/grammar.ron | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'crates/ra_syntax') diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index b0d2c3e20..c5ac90a62 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs @@ -1877,6 +1877,10 @@ impl<'a> MacroCall<'a> { pub fn token_tree(self) -> Option> { super::child_opt(self) } + + pub fn path(self) -> Option> { + super::child_opt(self) + } } // MatchArm diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron index 07b8433b2..aab4839a9 100644 --- a/crates/ra_syntax/src/grammar.ron +++ b/crates/ra_syntax/src/grammar.ron @@ -484,7 +484,7 @@ Grammar( "Name": (), "NameRef": (), - "MacroCall": ( options: [ "TokenTree" ] ), + "MacroCall": ( options: [ "TokenTree", "Path" ] ), "Attr": ( options: [ ["value", "TokenTree"] ] ), "TokenTree": (), "TypeParamList": ( -- cgit v1.2.3