diff options
author | John Hodge <tpg@mutabah.net> | 2016-06-12 14:00:32 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-06-12 14:00:32 +0800 |
commit | d7cff94061f2c42095e91ca5c30cffde03974cdc (patch) | |
tree | 4a560f568f7833588793d347bbd6a188230c49a5 /src/ast/ast.cpp | |
parent | 1c75ff6ca74ca61049b29c5b9ce6f916752c87c7 (diff) | |
download | mrust-d7cff94061f2c42095e91ca5c30cffde03974cdc.tar.gz |
Parse - Fix incorrect handling of trailing semicolons
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 77981a4d..8af991c0 100644 --- a/src/ast/ast.cpp +++ b/src/ast/ast.cpp @@ -105,6 +105,7 @@ SERIALISE_TYPE(ImplDef::, "AST_ImplDef", { void Impl::add_function(bool is_public, ::std::string name, Function fcn)
{
+ DEBUG("impl fn " << name);
m_items.push_back( Named<Item>( mv$(name), Item::make_Function({::std::move(fcn)}), is_public ) );
}
void Impl::add_type(bool is_public, ::std::string name, TypeRef type)
@@ -247,6 +248,7 @@ void Module::add_enum(bool is_public, ::std::string name, Enum item, MetaItems a this->add_item( is_public, name, Item::make_Enum({mv$(item)}), mv$(attrs) );
}
void Module::add_function(bool is_public, ::std::string name, Function item, MetaItems attrs) {
+ DEBUG("mod fn " << name);
this->add_item( is_public, name, Item::make_Function({mv$(item)}), mv$(attrs) );
}
void Module::add_submod(bool is_public, ::std::string name, Module mod, MetaItems attrs) {
@@ -452,6 +454,7 @@ void Trait::add_type(::std::string name, TypeRef type) { m_items.push_back( Named<Item>(mv$(name), Item::make_Type({TypeAlias(GenericParams(), mv$(type))}), true) );
}
void Trait::add_function(::std::string name, Function fcn) {
+ DEBUG("trait fn " << name);
m_items.push_back( Named<Item>(mv$(name), Item::make_Function({mv$(fcn)}), true) );
}
void Trait::add_static(::std::string name, Static v) {
|