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; Map type_map;
Ast_Module *builtins; Ast_Module *builtins;
// Array<Ast_File *> files;
Array<Ast_Module *> modules; Array<Ast_Module *> modules;
Array<Ast_Decl *> ordered_decls;
Ast_Scope *currently_parsed_scope; Ast_Scope *currently_parsed_scope;
Ast_File *currently_parsed_file; Ast_File *currently_parsed_file;
Array<Ast_Decl *> ordered_decls;
Array<Ast_Decl *> c_backend_decls;
S64 indent; S64 indent;
String_Builder gen; String_Builder gen;
@@ -242,6 +243,7 @@ parse_init(Parse_Ctx *ctx, Allocator *perm_allocator, Allocator *heap_allocator)
ctx->ordered_decls = {ctx->heap}; ctx->ordered_decls = {ctx->heap};
ctx->type_map = {ctx->heap}; ctx->type_map = {ctx->heap};
ctx->modules = {ctx->heap}; ctx->modules = {ctx->heap};
// ctx->files = {ctx->heap};
bigint_allocator = ctx->perm; bigint_allocator = ctx->perm;
arena_init(&ctx->stage_arena, "Compiler stage arena"_s); arena_init(&ctx->stage_arena, "Compiler stage arena"_s);

View File

@@ -42,10 +42,8 @@ want to export all the symbols, we can namespace them optionally.
@todo @todo
[ ] - #test construct that would gather all tests and run them on start of program or something [ ] - #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 [ ] - Foreign import that would link library
[ ] - Builtin dynamic arrays [ ] - Builtin dynamic arrays
[ ] - Better error messages when type difference
[ ] - Kilobyte, Megabyte, Gigabyte [ ] - Kilobyte, Megabyte, Gigabyte
[ ] - Cast from array to pointer? [ ] - Cast from array to pointer?
[ ] - Mixing loads and imports leads to code duplication, is that what we want??? [ ] - 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 [-] - Constants embeded in structs should be able to refer to other constants in that namespace without prefix
[-] - Order independent constants in structs [-] - Order independent constants in structs
[-] - Fix recursive lambdas 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 [-] - 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] - Emitting #line
[x] - Making sure debugger works [x] - Making sure debugger works