Before adding Any type
This commit is contained in:
22
compiler.h
22
compiler.h
@@ -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);
|
||||
|
||||
4
main.cpp
4
main.cpp
@@ -42,10 +42,8 @@ want to export all the symbols, we can namespace them optionally.
|
||||
|
||||
@todo
|
||||
[ ] - #test construct that would gather all tests and run them on start of program or something
|
||||
[ ] - Error message when file not found
|
||||
[ ] - Foreign import that would link library
|
||||
[ ] - Builtin dynamic arrays
|
||||
[ ] - Better error messages when type difference
|
||||
[ ] - Kilobyte, Megabyte, Gigabyte
|
||||
[ ] - Cast from array to pointer?
|
||||
[ ] - Mixing loads and imports leads to code duplication, is that what we want???
|
||||
@@ -100,6 +98,8 @@ want to export all the symbols, we can namespace them optionally.
|
||||
[-] - Constants embeded in structs should be able to refer to other constants in that namespace without prefix
|
||||
[-] - Order independent constants in structs
|
||||
[-] - Fix recursive lambdas in structs
|
||||
[x] - Error message when file not found
|
||||
[x] - Better error messages when type difference
|
||||
[-] - Fixing access to functions/structs, in C we cant have functons inside of structs / functions so we need to rewrite the tree
|
||||
[x] - Emitting #line
|
||||
[x] - Making sure debugger works
|
||||
|
||||
Reference in New Issue
Block a user