diff options
author | John Hodge <tpg@mutabah.net> | 2016-01-31 14:53:08 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-01-31 14:53:08 +0800 |
commit | 13075f30738556212ca0ff02d28dab75c268c1fd (patch) | |
tree | b051b1fa283b25477bf4cf8e5196f95295d9f4a5 /src/convert/ast_iterate.cpp | |
parent | 0b8f4dfa88d392ab188c3ee85e1afe1e3658cca5 (diff) | |
download | mrust-13075f30738556212ca0ff02d28dab75c268c1fd.tar.gz |
Name resolution in anon modules
Diffstat (limited to 'src/convert/ast_iterate.cpp')
-rw-r--r-- | src/convert/ast_iterate.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/convert/ast_iterate.cpp b/src/convert/ast_iterate.cpp index fd4ea614..79d4caf8 100644 --- a/src/convert/ast_iterate.cpp +++ b/src/convert/ast_iterate.cpp @@ -299,6 +299,14 @@ void CASTIterator::handle_module(AST::Path path, AST::Module& mod) DEBUG("Handling submod '" << submod.first.name() << "'"); handle_module(path + submod.first.name(), submod.first); } + unsigned int anon_mod_idx = 0; + for( auto& anonmod : mod.anon_mods() ) + { + auto& submod = *anonmod; + DEBUG("Handling submod #" << anon_mod_idx); + handle_module(path + FMT("#" << anon_mod_idx), submod); + anon_mod_idx += 1; + } UNINDENT(); } void CASTIterator::handle_function(AST::Path path, AST::Function& fcn) |