Fix return stmt when it's one lined(check for close brace).

This commit is contained in:
Daniel Gavin
2022-01-16 13:20:12 +01:00
parent f0529535e0
commit d57ec4a11d
+1 -1
View File
@@ -1312,7 +1312,7 @@ parse_stmt :: proc(p: ^Parser) -> ^ast.Stmt {
}
results: [dynamic]^ast.Expr
for p.curr_tok.kind != .Semicolon {
for p.curr_tok.kind != .Semicolon && p.curr_tok.kind != .Close_Brace {
result := parse_expr(p, false)
append(&results, result)
if p.curr_tok.kind != .Comma ||