diff options
author | John Hodge <tpg@mutabah.net> | 2016-09-26 16:05:59 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-09-26 16:05:59 +0800 |
commit | cf0bc71ad1bd5a9bc1c9ee19305aec0e31641986 (patch) | |
tree | 83ed832002ed45c2137ab71e22f6897d48ea79aa /src/ast/ast.cpp | |
parent | c7ab799892231de0bc91b16637c2f0fce11f3536 (diff) | |
download | mrust-cf0bc71ad1bd5a9bc1c9ee19305aec0e31641986.tar.gz |
AST - Move module-level macro invocations into the Item list
Diffstat (limited to 'src/ast/ast.cpp')
-rw-r--r-- | src/ast/ast.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ast/ast.cpp b/src/ast/ast.cpp index 885ea677..7b92be33 100644 --- a/src/ast/ast.cpp +++ b/src/ast/ast.cpp @@ -271,6 +271,9 @@ void Module::add_ext_crate(bool is_public, ::std::string ext_name, ::std::string void Module::add_alias(bool is_public, UseStmt us, ::std::string name, MetaItems attrs) {
this->add_item( is_public, mv$(name), Item(mv$(us)), mv$(attrs) );
}
+void Module::add_macro_invocation(MacroInvocation item) {
+ this->add_item( false, "", Item( mv$(item) ), ::AST::MetaItems {} );
+}
void Module::add_macro(bool is_exported, ::std::string name, MacroRulesPtr macro) {
m_macros.push_back( Named<MacroRulesPtr>( mv$(name), mv$(macro), is_exported ) );
}
|