Change the decl searching api while figuring out how to implement

function overloading
This commit is contained in:
Krzosa Karol
2022-09-29 12:04:21 +02:00
parent a7524a0071
commit 5f11a11f0f
9 changed files with 113 additions and 53 deletions

View File

@@ -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;