Fix codegen scope names
This commit is contained in:
@@ -172,7 +172,7 @@ function void
|
||||
gen_expr(Ast_Expr *ast){
|
||||
switch(ast->kind){
|
||||
CASE(IDENT, Atom){
|
||||
gen_scope_name(node->parent_scope);
|
||||
gen_scope_name(node->resolved_decl->parent_scope);
|
||||
gen("%s", node->intern_val.str);
|
||||
BREAK();
|
||||
}
|
||||
|
||||
1
main.cpp
1
main.cpp
@@ -50,6 +50,7 @@ want to export all the symbols, we can namespace them optionally.
|
||||
[ ] - Some way to take slice of data
|
||||
[ ] - slices should be properly displayed in debugger
|
||||
[ ] - elif
|
||||
[ ] - Hex 0x42
|
||||
|
||||
[ ] - #assert that handles constants at compile time and vars at runtime
|
||||
[ ] - Comma notation when declaring variables thing1, thing2: S32
|
||||
|
||||
@@ -645,6 +645,7 @@ resolve_field_access(Ast_Expr *node, Ast_Scope *context){
|
||||
Ast_Scope *scope = context ? context : node->parent_scope;
|
||||
Search_Flag flag = context ? SEARCH_ONLY_CURRENT_SCOPE : 0;
|
||||
Ast_Decl *decl = resolve_name(scope, node->pos, ident->intern_val, flag);
|
||||
ident->resolved_decl = decl;
|
||||
if(decl->kind == AST_FILE_NAMESPACE || decl->kind == AST_MODULE_NAMESPACE){
|
||||
assert(next);
|
||||
return resolve_field_access(next, decl->scope);
|
||||
|
||||
Reference in New Issue
Block a user