Getting absolute paths, Ast_Files now compare absolute paths
This commit is contained in:
16
compiler.h
16
compiler.h
@@ -200,6 +200,10 @@ struct Parse_Ctx:Lexer{
|
||||
Ast_Scope *currently_parsed_scope;
|
||||
Ast_File *currently_parsed_file;
|
||||
|
||||
Array<String> module_folders;
|
||||
String module_folder;
|
||||
String exe_folder;
|
||||
|
||||
S64 indent;
|
||||
String_Builder gen;
|
||||
String_Builder helper_builder;
|
||||
@@ -261,6 +265,16 @@ parse_init(Parse_Ctx *ctx, Allocator *perm_allocator, Allocator *heap_allocator)
|
||||
arena_init(&ctx->stage_arena, "Compiler stage arena"_s);
|
||||
|
||||
lex_init(ctx->perm, ctx->heap, ctx);
|
||||
|
||||
init_type();
|
||||
|
||||
// Init paths
|
||||
ctx->exe_folder = os_get_exe_dir(ctx->perm);
|
||||
|
||||
ctx->module_folders = {ctx->heap};
|
||||
String main_module = string_fmt(ctx->perm, "%Q/modules", ctx->exe_folder);
|
||||
ctx->module_folders.add(main_module);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user