Core: Factor + start defer

This commit is contained in:
Krzosa Karol
2023-04-22 13:46:21 +02:00
parent b51a2080d2
commit d9a7882f8c
6 changed files with 228 additions and 203 deletions

View File

@@ -334,6 +334,7 @@ enum Ast_Kind : uint32_t {
AST_TYPE_OF,
AST_VARGS_LAMBDA_PARAM,
AST_DEFER,
AST_LABEL,
AST_GOTO,
AST_SWITCH,
@@ -535,6 +536,10 @@ struct Ast_Goto : Ast {
Intern_String label;
};
struct Ast_Defer : Ast {
Ast_Scope *scope;
};
struct Ast_For : Ast {
Ast_Expr *init;
Ast_Expr *cond;
@@ -636,7 +641,7 @@ struct Ast_Decl : Ast {
Array<Ast_Type *> polymorph_resolved_parameter_types;
Array<Ast_Decl *> polymorph_parameters;
Array<Ast_Decl *> polymorphs; // instantiated polymorphs
Ast_Scope *scope;
Ast_Expr *typespec;
union {