For loop iterate through arrays and slices
This commit is contained in:
@@ -234,7 +234,7 @@ parse_stmt_scope(Ast_Scope *scope_defined_outside = 0){
|
||||
}
|
||||
|
||||
else if(token_match_keyword(keyword_switch)){
|
||||
Ast_Switch *result = MAKE_AST(Ast_Switch, AST_SWITCH, token, AST_STMT);
|
||||
Ast_Switch *result = new_ast(Ast_Switch, AST_SWITCH, token, AST_STMT);
|
||||
result->value = parse_expr();
|
||||
result->cases = {scratch};
|
||||
|
||||
@@ -245,7 +245,7 @@ parse_stmt_scope(Ast_Scope *scope_defined_outside = 0){
|
||||
continue;
|
||||
}
|
||||
|
||||
Ast_Switch_Case *switch_case = MAKE_AST(Ast_Switch_Case, AST_SWITCH_CASE, token_get(), AST_STMT);
|
||||
Ast_Switch_Case *switch_case = new_ast(Ast_Switch_Case, AST_SWITCH_CASE, token_get(), AST_STMT);
|
||||
if(token_match_pound(pctx->intern("fallthrough"_s)))
|
||||
switch_case->fallthrough = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user