Disallow sharing files between modules

This commit is contained in:
Krzosa Karol
2022-06-26 19:20:13 +02:00
parent cd2a1a81d1
commit 06dcb718fd
3 changed files with 36 additions and 12 deletions

View File

@@ -192,13 +192,13 @@ struct Parse_Ctx:Lexer{
Ast_Module *language_base_module;
// Array<Ast_File *> files;
Array<Ast_Module *> modules;
Array<Ast_Decl *> ordered_decls;
Array<Ast_File *> files;
Array<Ast_Module *> modules;
Array<Ast_Decl *> ordered_decls;
S32 base_language_ordered_decl_len;
Ast_Scope *currently_parsed_scope;
Ast_File *currently_parsed_file;
Ast_Scope *currently_parsed_scope;
Ast_File *currently_parsed_file;
S64 indent;
String_Builder gen;
@@ -256,6 +256,7 @@ parse_init(Parse_Ctx *ctx, Allocator *perm_allocator, Allocator *heap_allocator)
ctx->modules = {ctx->heap};
ctx->all_types = {ctx->heap};
ctx->helper_builder= {ctx->heap};
ctx->files = {ctx->heap};
bigint_allocator = ctx->perm;
arena_init(&ctx->stage_arena, "Compiler stage arena"_s);