Merge pull request #6794 from peperronii/patch-1

Fix error message: 'do' not on the same line as 'for'
This commit is contained in:
gingerBill
2026-06-08 08:26:34 +01:00
committed by GitHub

View File

@@ -898,7 +898,7 @@ parse_for_stmt :: proc(p: ^Parser) -> ^ast.Stmt {
if allow_token(p, .Do) {
body = convert_stmt_to_body(p, parse_stmt(p))
if tok.pos.line != body.pos.line {
error(p, body.pos, "the body of a 'do' must be on the same line as 'else'")
error(p, body.pos, "the body of a 'do' must be on the same line as 'for'")
}
} else {