Browse Source

Merge pull request #1394 from Tetralux/parse-allman-for

core:odin/parser: Fix parsing of Allman style braces in for loops
Jeroen van Rijn 3 years ago
parent
commit
6f370fdbf2
1 changed files with 1 additions and 0 deletions
  1. 1 0
      core/odin/parser/parser.odin

+ 1 - 0
core/odin/parser/parser.odin

@@ -888,6 +888,7 @@ parse_for_stmt :: proc(p: ^Parser) -> ^ast.Stmt {
 			error(p, body.pos, "the body of a 'do' must be on the same line as the 'for' token")
 		}
 	} else {
+		allow_token(p, .Semicolon)
 		body = parse_body(p)
 	}