瀏覽代碼

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

Tetralux 3 年之前
父節點
當前提交
a60667e900
共有 1 個文件被更改,包括 1 次插入0 次删除
  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)
 	}
 	}