Browse Source

Fix parsing error for `for`

gingerBill 4 years ago
parent
commit
348d25c43a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/parser.cpp

+ 1 - 1
src/parser.cpp

@@ -3975,7 +3975,7 @@ Ast *parse_for_stmt(AstFile *f) {
 			}
 			}
 		}
 		}
 
 
-		if (!is_range && allow_token(f, Token_Semicolon)) {
+		if (!is_range && parse_control_statement_semicolon_separator(f)) {
 			init = cond;
 			init = cond;
 			cond = nullptr;
 			cond = nullptr;
 			if (f->curr_token.kind != Token_Semicolon) {
 			if (f->curr_token.kind != Token_Semicolon) {