Core: Add continue keyword

This commit is contained in:
Krzosa Karol
2023-04-21 08:02:58 +02:00
parent e6bf6b680e
commit 200b5e4f9f
11 changed files with 33 additions and 11 deletions

View File

@@ -156,6 +156,12 @@ ast_break(Token *pos) {
return result;
}
CORE_Static Ast_Pass *
ast_continue(Token *pos) {
AST_NEW(Pass, CONTINUE, pos, AST_STMT);
return result;
}
CORE_Static Ast_Return *
ast_return(Token *pos, Array<Ast_Expr *> expr) {
AST_NEW(Return, RETURN, pos, AST_STMT);
@@ -541,8 +547,9 @@ void next(Ast_Iter *iter) {
For(node->vars) iter->stack.add(it);
} break;
case AST_BREAK:
case AST_PASS:
case AST_BREAK: {
case AST_CONTINUE: {
Ast *node = (Ast *)ast;
} break;