aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/macros
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/macros')
-rw-r--r--crates/ra_hir/src/macros/mbe.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/crates/ra_hir/src/macros/mbe.rs b/crates/ra_hir/src/macros/mbe.rs
index 3d6dcefa8..62b7fa24c 100644
--- a/crates/ra_hir/src/macros/mbe.rs
+++ b/crates/ra_hir/src/macros/mbe.rs
@@ -86,14 +86,17 @@ pub(crate) fn parse(tt: &tt::Subtree) -> Option<MacroRules> {
86 86
87fn parse_rule(p: &mut RulesParser) -> Option<Rule> { 87fn parse_rule(p: &mut RulesParser) -> Option<Rule> {
88 let lhs = parse_subtree(p.eat_subtree()?)?; 88 let lhs = parse_subtree(p.eat_subtree()?)?;
89 p.eat_punct('='); 89 p.eat_punct('=')?;
90 p.eat_punct('>'); 90 p.eat_punct('>')?;
91 let rhs = parse_subtree(p.eat_subtree()?)?; 91 let rhs = parse_subtree(p.eat_subtree()?)?;
92 Some(Rule { lhs, rhs }) 92 Some(Rule { lhs, rhs })
93} 93}
94 94
95fn parse_subtree(tt: &tt::Subtree) -> Option<Subtree> { 95fn parse_subtree(tt: &tt::Subtree) -> Option<Subtree> {
96 None 96 Some(Subtree {
97 token_trees: Vec::new(),
98 delimiter: Delimiter::None,
99 })
97} 100}
98 101
99struct RulesParser<'a> { 102struct RulesParser<'a> {