Fix not top level ast's getting into ordered list. Delete parent nodes

This commit is contained in:
Krzosa Karol
2022-06-10 16:47:49 +02:00
parent 6ad5f4e706
commit 957dbbd5cc
6 changed files with 18 additions and 59 deletions

View File

@@ -568,6 +568,7 @@ compile_files(Array<String> filename){
Ast_Decl *decl = parse_decl(true);
if(!decl) break;
set_flag(decl->flags, AST_PACKAGE_LEVEL);
if(decl->kind == AST_STRUCT){
decl->type = type_type;
decl->type_val = type_incomplete(decl);