mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-29 01:33:56 +00:00
odin/parser: Allow semicolon after return statement for the case:
if x do return y; else do return z;
This commit is contained in:
@@ -1340,6 +1340,7 @@ parse_stmt :: proc(p: ^Parser) -> ^ast.Stmt {
|
||||
|
||||
rs := ast.new(ast.Return_Stmt, tok.pos, end)
|
||||
rs.results = results[:]
|
||||
expect_semicolon(p, rs)
|
||||
return rs
|
||||
|
||||
case .Break, .Continue, .Fallthrough:
|
||||
|
||||
Reference in New Issue
Block a user