Browse Source

core:odin/parser: Fix parsing of Allman style braces in for loops

Tetralux 3 years ago
parent
commit
a60667e900
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")
 			error(p, body.pos, "the body of a 'do' must be on the same line as the 'for' token")
 		}
 		}
 	} else {
 	} else {
+		allow_token(p, .Semicolon)
 		body = parse_body(p)
 		body = parse_body(p)
 	}
 	}