aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-05-02 00:11:36 +0100
committergingerBill <bill@gingerbill.org>2021-05-02 00:11:36 +0100
commit348d25c43aa8b0ffe1070bec70b56d06191a1a3d (patch)
tree6afc6d8e60cecc98f2e0111d7a5b599611ba6989 /src/parser.cpp
parent9854dbe8897b3722e571a23b699c234cfc0baa83 (diff)
Fix parsing error for `for`
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index 12f0fb9be..c6690990f 100644
--- a/src/parser.cpp
+++ b/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;
cond = nullptr;
if (f->curr_token.kind != Token_Semicolon) {