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

@@ -177,6 +177,13 @@ ast_return(Token *pos, Ast_Expr *expr) {
return result;
}
CORE_Static Ast_Defer *
ast_defer(Token *pos, Ast_Scope *scope) {
Ast_Defer *result = ast_new(Ast_Defer, AST_DEFER, pos, AST_STMT);
result->scope = scope;
return result;
}
CORE_Static Ast_Goto *
ast_goto(Token *pos, Intern_String label) {
Ast_Goto *result = ast_new(Ast_Goto, AST_GOTO, pos, AST_STMT);