Core: Add goto
This commit is contained in:
@@ -423,6 +423,12 @@ parse_stmt_scope(Ast_Scope *scope_defined_outside = 0) {
|
||||
scope->stmts.add(result_if);
|
||||
}
|
||||
|
||||
else if (token_match_keyword(pctx->keyword_goto)) {
|
||||
Token *ident = token_expect(TK_Identifier);
|
||||
Ast_Goto *result = ast_goto(token, ident->intern_val);
|
||||
scope->stmts.add(result);
|
||||
}
|
||||
|
||||
// Label
|
||||
else if (token_match(TK_Colon)) {
|
||||
Token *ident = token_expect(TK_Identifier);
|
||||
|
||||
Reference in New Issue
Block a user