summaryrefslogtreecommitdiff
path: root/src/ast
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-08-19 11:15:45 +0800
committerJohn Hodge <tpg@mutabah.net>2016-08-19 11:15:45 +0800
commitb7b634f517967da41befff67d579c5a1afa8d016 (patch)
tree60f279e93a05d51acb94637c21cf5a0110bb008a /src/ast
parenta3e8257c4f77f197c9be2dbae7aaddb81257abb2 (diff)
downloadmrust-b7b634f517967da41befff67d579c5a1afa8d016.tar.gz
AST - Macro invocations in item list
Diffstat (limited to 'src/ast')
-rw-r--r--src/ast/ast.cpp3
-rw-r--r--src/ast/ast.hpp1
2 files changed, 4 insertions, 0 deletions
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); ),
diff --git a/src/ast/ast.hpp b/src/ast/ast.hpp
index 02e9c5f2..b14d7e46 100644
--- a/src/ast/ast.hpp
+++ b/src/ast/ast.hpp
@@ -661,6 +661,7 @@ private:
TAGGED_UNION_EX(Item, (: public Serialisable), None,
(
(None, struct {} ),
+ (MacroInv, MacroInvocation),
(Module, Module),
(Crate, struct {
::std::string name;