Load is file relative not module relative

This commit is contained in:
Krzosa Karol
2022-10-09 15:20:53 +02:00
parent 54426fdd69
commit 9ad2da03c8
8 changed files with 16 additions and 21 deletions

View File

@@ -273,14 +273,13 @@ compile_file_to_string(String filename){
parse_all_modules();
resolve_everything_in_module(module);
// @note: language stuff needs to be declared before type_info data
// so we mark where it ends
pctx->base_language_ordered_decl_len = length(&pctx->ordered_decls);
Ast_Decl *any_decl = search_for_single_decl(module, pctx->intern("Any"_s));
assert(any_decl->type == type_type);
type_any = any_decl->type_val;
}
@@ -289,7 +288,6 @@ compile_file_to_string(String filename){
assert(module);
resolve_everything_in_module(module);
arena_clear(&pctx->stage_arena);
String result = compile_to_c_code();
return result;