diff options
author | John Hodge <tpg@mutabah.net> | 2016-09-01 16:19:53 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-09-01 16:19:53 +0800 |
commit | bf2f4a5483c6e6c36718c287f21759a294682e60 (patch) | |
tree | 65c3222a98ef1d01e6803f59e100e26e4f1f4d93 /src/resolve/absolute.cpp | |
parent | ea65072638924847a61981f058d1f02af9fbe31d (diff) | |
download | mrust-bf2f4a5483c6e6c36718c287f21759a294682e60.tar.gz |
Resolve Abs - Abs import paths
Diffstat (limited to 'src/resolve/absolute.cpp')
-rw-r--r-- | src/resolve/absolute.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/resolve/absolute.cpp b/src/resolve/absolute.cpp index 597097aa..7106e572 100644 --- a/src/resolve/absolute.cpp +++ b/src/resolve/absolute.cpp @@ -1895,6 +1895,24 @@ void Resolve_Absolute_Mod( Context item_context, ::AST::Module& mod ) item_context.pop(impl_def.params()); item_context.pop_self( impl_def.type() ); } + + // - Run through the indexed items and fix up those paths + static Span sp; + for(auto& i : mod.m_namespace_items) { + if( i.second.is_import ) { + Resolve_Absolute_Path(item_context, sp, Context::LookupMode::Namespace, i.second.path); + } + } + for(auto& i : mod.m_type_items) { + if( i.second.is_import ) { + Resolve_Absolute_Path(item_context, sp, Context::LookupMode::Type, i.second.path); + } + } + for(auto& i : mod.m_value_items) { + if( i.second.is_import ) { + Resolve_Absolute_Path(item_context, sp, Context::LookupMode::Constant, i.second.path); + } + } } void Resolve_Absolutise(AST::Crate& crate) |