From fe802a25706ed3d2b3b8a0b16b2af3649eec9ca9 Mon Sep 17 00:00:00 2001 From: Robert Konrad Date: Wed, 4 Oct 2023 13:22:56 +0200 Subject: [PATCH] Fix var assigns --- Sources/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/parser.c b/Sources/parser.c index db898fc..16a9607 100644 --- a/Sources/parser.c +++ b/Sources/parser.c @@ -311,7 +311,7 @@ static statement *parse_statement(state_t *state) { expression *init = NULL; if (current(state).kind == TOKEN_OPERATOR) { - match_token(state, OPERATOR_ASSIGN, "Expected an assign"); + check(current(state).op == OPERATOR_ASSIGN, current(state).column, current(state).line, "Expected an assign"); advance_state(state); init = parse_expression(state); }