Skip to content

Commit

Permalink
Fix var assigns
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Oct 4, 2023
1 parent 7da1ad8 commit fe802a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit fe802a2

Please sign in to comment.