Fix typo in parser.odin

This commit is contained in:
gingerBill
2020-03-07 21:12:52 +00:00
parent 5d14189a18
commit a83d9f59f6
+1 -1
View File
@@ -2754,7 +2754,7 @@ parse_binary_expr :: proc(p: ^Parser, lhs: bool, prec_in: int) -> ^ast.Expr {
} else if op.kind == .When { } else if op.kind == .When {
x := expr; x := expr;
cond := parse_expr(p, lhs); cond := parse_expr(p, lhs);
op2 := expect_token(p, .Else); else_tok := expect_token(p, .Else);
y := parse_expr(p, lhs); y := parse_expr(p, lhs);
te := ast.new(ast.Ternary_When_Expr, expr.pos, end_pos(p.prev_tok)); te := ast.new(ast.Ternary_When_Expr, expr.pos, end_pos(p.prev_tok));
te.x = x; te.x = x;