Core: Add goto
This commit is contained in:
10
core_ast.cpp
10
core_ast.cpp
@@ -177,6 +177,13 @@ ast_return(Token *pos, Ast_Expr *expr) {
|
||||
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);
|
||||
result->label = label;
|
||||
return result;
|
||||
}
|
||||
|
||||
CORE_Static Ast_Label *
|
||||
ast_label(Token *pos, Intern_String name, Ast_Scope *scope, bool enable_goto) {
|
||||
Ast_Label *result = ast_new(Ast_Label, AST_LABEL, pos, AST_STMT | AST_DECL);
|
||||
@@ -572,10 +579,11 @@ void next(Ast_Iter *iter) {
|
||||
case AST_BREAK:
|
||||
case AST_PASS:
|
||||
case AST_CONTINUE:
|
||||
case AST_GOTO:
|
||||
case AST_COMPILER_BREAKPOINT_STMT: {
|
||||
Ast *node = (Ast *)ast;
|
||||
} break;
|
||||
|
||||
case AST_LABEL:
|
||||
case AST_NAMESPACE:
|
||||
case AST_STRUCT:
|
||||
case AST_UNION:
|
||||
|
||||
Reference in New Issue
Block a user