Change the decl searching api while figuring out how to implement
function overloading
This commit is contained in:
@@ -751,6 +751,7 @@ register_ast_file(Token *pos, String absolute_file_path, Ast_Module *module, B32
|
||||
file->decls = {pctx->heap};
|
||||
file->implicit_imports = {pctx->heap};
|
||||
file->pos = pos;
|
||||
file->debug_name = string_skip_to_last_slash(absolute_file_path);
|
||||
file->module->all_loaded_files.add(file);
|
||||
file->scope_id = pctx->scope_ids++;
|
||||
pctx->files.add(file);
|
||||
@@ -891,6 +892,10 @@ parse_file(Ast_File *file){
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!file->pos){
|
||||
file->pos = token_get();
|
||||
}
|
||||
|
||||
Ast_Decl *decl = parse_decl(true);
|
||||
if(!decl) break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user