Browse Source

Merge pull request #1430 from DanielGavin/parser-fix

Fix return stmt when it's one lined(check for close brace).
gingerBill 3 years ago
parent
commit
9cf937fef0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/odin/parser/parser.odin

+ 1 - 1
core/odin/parser/parser.odin

@@ -1312,7 +1312,7 @@ parse_stmt :: proc(p: ^Parser) -> ^ast.Stmt {
 		}
 		}
 
 
 		results: [dynamic]^ast.Expr
 		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)
 			result := parse_expr(p, false)
 			append(&results, result)
 			append(&results, result)
 			if p.curr_tok.kind != .Comma ||
 			if p.curr_tok.kind != .Comma ||