Before adding Any type

This commit is contained in:
Krzosa Karol
2022-06-18 14:38:53 +02:00
parent 499faac256
commit 8ead876d90
2 changed files with 14 additions and 12 deletions

View File

@@ -186,11 +186,12 @@ struct Parse_Ctx:Lexer{
Map type_map;
Ast_Module *builtins;
// Array<Ast_File *> files;
Array<Ast_Module *> modules;
Array<Ast_Decl *> ordered_decls;
Ast_Scope *currently_parsed_scope;
Ast_File *currently_parsed_file;
Array<Ast_Decl *> ordered_decls;
Array<Ast_Decl *> c_backend_decls;
S64 indent;
String_Builder gen;
@@ -235,14 +236,15 @@ lex_init(Allocator *token_string_arena, Allocator *map_allocator, Lexer *l){
function void
parse_init(Parse_Ctx *ctx, Allocator *perm_allocator, Allocator *heap_allocator){
pctx = ctx;
ctx->perm = perm_allocator;
ctx->heap = heap_allocator;
ctx->gen = {ctx->heap};
ctx->ordered_decls = {ctx->heap};
ctx->type_map = {ctx->heap};
ctx->modules = {ctx->heap};
bigint_allocator = ctx->perm;
pctx = ctx;
ctx->perm = perm_allocator;
ctx->heap = heap_allocator;
ctx->gen = {ctx->heap};
ctx->ordered_decls = {ctx->heap};
ctx->type_map = {ctx->heap};
ctx->modules = {ctx->heap};
// ctx->files = {ctx->heap};
bigint_allocator = ctx->perm;
arena_init(&ctx->stage_arena, "Compiler stage arena"_s);
lex_init(ctx->perm, ctx->heap, ctx);