diff options
author | John Hodge <tpg@mutabah.net> | 2015-03-31 19:42:05 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2015-03-31 19:42:05 +0800 |
commit | 752202c3857b00d0aa53117573d4a931f79ed65d (patch) | |
tree | c1884c7206604f778c2b8607febd53489e29a7fd /src/ast/ast.cpp | |
parent | f725889aedd5b64141e8f8e9924e4e59f716c225 (diff) | |
download | mrust-752202c3857b00d0aa53117573d4a931f79ed65d.tar.gz |
Add Copy impls (hacky), and parameter count checking/extending
Diffstat (limited to 'src/ast/ast.cpp')
-rw-r--r-- | src/ast/ast.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ast/ast.cpp b/src/ast/ast.cpp index 4c400a47..c071e139 100644 --- a/src/ast/ast.cpp +++ b/src/ast/ast.cpp @@ -180,12 +180,14 @@ static void iterate_module(Module& mod, ::std::function<void(Module& mod)> fcn) void Crate::post_parse()
{
// Iterate all modules, grabbing pointers to all impl blocks
- iterate_module(m_root_module, [this](Module& mod){
+ auto cb = [this](Module& mod){
for( auto& impl : mod.impls() )
{
m_impl_index.push_back( &impl );
}
- });
+ };
+ iterate_module(m_root_module, cb);
+ iterate_module(g_compiler_module, cb);
}
void Crate::iterate_functions(fcn_visitor_t* visitor)
|