diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/parse/expr.cpp | 2 | ||||
-rw-r--r-- | src/resolve/use.cpp | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/parse/expr.cpp b/src/parse/expr.cpp index 788a68f5..e0529155 100644 --- a/src/parse/expr.cpp +++ b/src/parse/expr.cpp @@ -494,6 +494,7 @@ ExprNodeP Parse_Stmt(TokenStream& lex) ExprNodeP val; switch(LOOK_AHEAD(lex)) { + case TOK_EOF: case TOK_SEMICOLON: case TOK_COMMA: case TOK_BRACE_CLOSE: @@ -525,6 +526,7 @@ ExprNodeP Parse_Stmt(TokenStream& lex) ExprNodeP val; switch(tok.type()) { + case TOK_EOF: case TOK_SEMICOLON: case TOK_COMMA: case TOK_BRACE_OPEN: diff --git a/src/resolve/use.cpp b/src/resolve/use.cpp index 5e1fce6d..be0c2ab8 100644 --- a/src/resolve/use.cpp +++ b/src/resolve/use.cpp @@ -443,7 +443,15 @@ void Resolve_Use_Mod(const ::AST::Crate& crate, ::AST::Module& mod, ::AST::Path } } else { - TODO(span, "Look up '" << des_item_name << "' in wildcard of enum - HIR"); + const auto& enm = *e.hir; + unsigned int i = 0; + for(const auto& var : enm.m_variants) + { + if( var.first == des_item_name ) { + return ::AST::PathBinding::make_EnumVar({ nullptr, i, &enm }); + } + i ++; + } } ) ) |