Working on slices, builtin stuff feels wanky, rewrite gen_simple_decl to
generate string
This commit is contained in:
17
compiler.h
17
compiler.h
@@ -3,6 +3,7 @@ struct Ast_Decl;
|
||||
struct Ast_File_Namespace;
|
||||
struct Ast_File;
|
||||
struct Ast_Module;
|
||||
struct Ast_Type;
|
||||
function Ast_Module *ast_module(Intern_String filename);
|
||||
function void insert_builtin_types_into_scope(Ast_Scope *p);
|
||||
|
||||
@@ -221,14 +222,14 @@ 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->perm};
|
||||
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->perm};
|
||||
ctx->ordered_decls = {ctx->heap};
|
||||
ctx->type_map = {ctx->heap};
|
||||
ctx->modules = {ctx->heap};
|
||||
bigint_allocator = ctx->perm;
|
||||
|
||||
lex_init(ctx->perm, ctx->heap, ctx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user