From 5691da4c84655e0d966ac11406fa7a90bdd02643 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 5 Aug 2018 14:16:38 +0300 Subject: Expr macros --- src/grammar/items/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/grammar/items') diff --git a/src/grammar/items/mod.rs b/src/grammar/items/mod.rs index 8f766901e..657078765 100644 --- a/src/grammar/items/mod.rs +++ b/src/grammar/items/mod.rs @@ -277,7 +277,7 @@ fn mod_item(p: &mut Parser) { } } -enum MacroFlavor { +pub(super) enum MacroFlavor { Curly, NonCurly, } @@ -285,6 +285,10 @@ enum MacroFlavor { fn macro_call(p: &mut Parser) -> MacroFlavor { assert!(paths::is_path_start(p)); paths::use_path(p); + macro_call_after_excl(p) +} + +pub(super) fn macro_call_after_excl(p: &mut Parser) -> MacroFlavor { p.expect(EXCL); p.eat(IDENT); let flavor = match p.current() { -- cgit v1.2.3