Core: Add goto

This commit is contained in:
Krzosa Karol
2023-04-22 13:14:08 +02:00
parent eff6b10cf4
commit 654d6f17e4
10 changed files with 42 additions and 9 deletions

View File

@@ -621,6 +621,11 @@ gen_ast(Ast *ast) {
BREAK();
}
case AST_GOTO: {
auto n = (Ast_Goto *)ast;
gen("goto %Q;", n->label);
} break;
case AST_LABEL: {
auto n = (Ast_Label *)ast;
if (n->enable_goto == false) gen("/* %Q */", n->name);