Module relative folders working

This commit is contained in:
Krzosa Karol
2022-06-27 10:24:58 +02:00
parent 6644a2c5ae
commit 15d452cae3
8 changed files with 42 additions and 21 deletions

View File

@@ -203,6 +203,7 @@ struct Parse_Ctx:Lexer{
Array<String> module_folders;
String module_folder;
String exe_folder;
String working_folder;
S64 indent;
String_Builder gen;
@@ -269,6 +270,7 @@ parse_init(Parse_Ctx *ctx, Allocator *perm_allocator, Allocator *heap_allocator)
// Init paths
ctx->exe_folder = os_get_exe_dir(ctx->perm);
ctx->working_folder = os_get_working_dir(ctx->perm);
ctx->module_folders = {ctx->heap};
String main_module = string_fmt(ctx->perm, "%Q/modules", ctx->exe_folder);