summaryrefslogtreecommitdiff
path: root/src/parse/root.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2015-03-17 22:12:27 +0800
committerJohn Hodge <tpg@mutabah.net>2015-03-17 22:12:27 +0800
commit993f20b4cd3cc4692817ded4f632efcff6d7b72f (patch)
treec50cef2f46eba12a5338ed2c218d804f7d2b40b0 /src/parse/root.cpp
parentda1656ae893337e0bfab092c2236ff42eb23dac6 (diff)
downloadmrust-993f20b4cd3cc4692817ded4f632efcff6d7b72f.tar.gz
Block fn-s, parse (but no AST) for array literals
Diffstat (limited to 'src/parse/root.cpp')
-rw-r--r--src/parse/root.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/parse/root.cpp b/src/parse/root.cpp
index 270b38e0..cd197292 100644
--- a/src/parse/root.cpp
+++ b/src/parse/root.cpp
@@ -1490,6 +1490,9 @@ void Parse_ModRoot_Items(TokenStream& lex, AST::Crate& crate, AST::Module& mod,
// Pass "!" as 'path' to allow termination on EOF
Parse_ModRoot_Items(*expanded_macro, crate, mod, modstack, "!");
}
+ // - Silently consume ';' after the macro
+ if( GET_TOK(tok, lex) != TOK_SEMICOLON )
+ lex.putback(tok);
break;
case TOK_RWORD_USE: