Переглянути джерело

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 роки тому
батько
коміт
6f370fdbf2
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)
 	}
 	}