mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +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 := ast.new(ast.Return_Stmt, tok.pos, end)
|
||||||
rs.results = results[:]
|
rs.results = results[:]
|
||||||
|
expect_semicolon(p, rs)
|
||||||
return rs
|
return rs
|
||||||
|
|
||||||
case .Break, .Continue, .Fallthrough:
|
case .Break, .Continue, .Fallthrough:
|
||||||
|
|||||||
Reference in New Issue
Block a user