From b7b634f517967da41befff67d579c5a1afa8d016 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Fri, 19 Aug 2016 11:15:45 +0800 Subject: AST - Macro invocations in item list --- src/ast/ast.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/ast/ast.cpp') diff --git a/src/ast/ast.cpp b/src/ast/ast.cpp index 1da79f33..8052a51e 100644 --- a/src/ast/ast.cpp +++ b/src/ast/ast.cpp @@ -262,6 +262,9 @@ Module::ItemRef Module::find_item(const ::std::string& needle, bool allow_leaves (None, throw ::std::runtime_error("BUG: Hit a None item"); ), + (MacroInv, + throw ::std::runtime_error("BUG: Hit a macro invocation"); + ), (Module, return ItemRef(e); ), (Crate, return ItemRef(e.name); ), (Type, return ItemRef(e); ), -- cgit v1.2.3