diff options
author | John Hodge <tpg@mutabah.net> | 2016-10-09 10:27:50 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-10-09 10:27:50 +0800 |
commit | 967ccfbfd50e0ce0aec985bcb394e34787450f75 (patch) | |
tree | 7bddc5c13047aa7b0f12247edb4a8ca965f657d6 /src/ast/ast.cpp | |
parent | 5d75ae0b19803ee79d191cd985b5e8896df51ccb (diff) | |
download | mrust-967ccfbfd50e0ce0aec985bcb394e34787450f75.tar.gz |
AST - Remove free MacroInvocation lists
Diffstat (limited to 'src/ast/ast.cpp')
-rw-r--r-- | src/ast/ast.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ast/ast.cpp b/src/ast/ast.cpp index 157461c1..25a1c82f 100644 --- a/src/ast/ast.cpp +++ b/src/ast/ast.cpp @@ -206,6 +206,9 @@ void Impl::add_static(bool is_public, bool is_specialisable, ::std::string name, {
m_items.push_back( ImplItem { is_public, is_specialisable, mv$(name), box$( Item::make_Static(mv$(v)) ) } );
}
+void Impl::add_macro_invocation(MacroInvocation item) {
+ m_items.push_back( ImplItem { false, false, "", box$( Item::make_MacroInv(mv$(item)) ) } );
+}
bool Impl::has_named_item(const ::std::string& name) const
{
@@ -243,7 +246,7 @@ bool Impl::has_named_item(const ::std::string& name) const MacroInvocation MacroInvocation::clone() const
{
- return MacroInvocation(m_span, m_attrs.clone(), m_macro_name, m_ident, m_input.clone());
+ return MacroInvocation(m_span, m_macro_name, m_ident, m_input.clone());
}
|