From 967ccfbfd50e0ce0aec985bcb394e34787450f75 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 9 Oct 2016 10:27:50 +0800 Subject: AST - Remove free MacroInvocation lists --- src/ast/ast.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/ast/ast.cpp') 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()); } -- cgit v1.2.3