summaryrefslogtreecommitdiff
path: root/src/convert/ast_iterate.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-01-31 14:53:08 +0800
committerJohn Hodge <tpg@mutabah.net>2016-01-31 14:53:08 +0800
commit13075f30738556212ca0ff02d28dab75c268c1fd (patch)
treeb051b1fa283b25477bf4cf8e5196f95295d9f4a5 /src/convert/ast_iterate.cpp
parent0b8f4dfa88d392ab188c3ee85e1afe1e3658cca5 (diff)
downloadmrust-13075f30738556212ca0ff02d28dab75c268c1fd.tar.gz
Name resolution in anon modules
Diffstat (limited to 'src/convert/ast_iterate.cpp')
-rw-r--r--src/convert/ast_iterate.cpp8
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)