diff options
Diffstat (limited to 'src/resolve/use.cpp')
-rw-r--r-- | src/resolve/use.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/resolve/use.cpp b/src/resolve/use.cpp index 3ddee7c2..12c4b458 100644 --- a/src/resolve/use.cpp +++ b/src/resolve/use.cpp @@ -220,11 +220,10 @@ void Resolve_Use_Mod(const ::AST::Crate& crate, ::AST::Module& mod, ::AST::Path // IMPOSSIBLE - Handled above ), (MacroInv, - BUG(span, "HIt MacroInv in use resolution"); + BUG(span, "Hit MacroInv in use resolution"); ), (Crate, - //return ::AST::PathBinding::make_Crate({&e}); - TODO(span, "Handle importing from a crate"); + return ::AST::PathBinding::make_Crate({ &crate.m_extern_crates.at(e.name) }); ), (Type, return ::AST::PathBinding::make_TypeAlias({&e}); @@ -313,6 +312,9 @@ void Resolve_Use_Mod(const ::AST::Crate& crate, ::AST::Module& mod, ::AST::Path ( ERROR(span, E0000, "Unexpected item type in import"); ), + (Crate, + TODO(span, "Get binding within an extern crate"); + ), (Enum, const auto& enum_ = *e.enum_; i += 1; |