aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-12-28 13:59:58 +0000
committerAleksey Kladov <[email protected]>2018-12-28 13:59:58 +0000
commit406505e096b4e6626ba8eb6c035671783ed2a577 (patch)
tree6bd7e4eef15f3632f234aaa93f869062e030b381 /crates/ra_syntax
parent072028e67996162f5a9da14cfd59ed64de5e8729 (diff)
super simplistic macro expansion
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r--crates/ra_syntax/src/ast/generated.rs4
-rw-r--r--crates/ra_syntax/src/grammar.ron2
2 files changed, 5 insertions, 1 deletions
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> {
1877 pub fn token_tree(self) -> Option<TokenTree<'a>> { 1877 pub fn token_tree(self) -> Option<TokenTree<'a>> {
1878 super::child_opt(self) 1878 super::child_opt(self)
1879 } 1879 }
1880
1881 pub fn path(self) -> Option<Path<'a>> {
1882 super::child_opt(self)
1883 }
1880} 1884}
1881 1885
1882// MatchArm 1886// 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(
484 484
485 "Name": (), 485 "Name": (),
486 "NameRef": (), 486 "NameRef": (),
487 "MacroCall": ( options: [ "TokenTree" ] ), 487 "MacroCall": ( options: [ "TokenTree", "Path" ] ),
488 "Attr": ( options: [ ["value", "TokenTree"] ] ), 488 "Attr": ( options: [ ["value", "TokenTree"] ] ),
489 "TokenTree": (), 489 "TokenTree": (),
490 "TypeParamList": ( 490 "TypeParamList": (