Fix bug causing incorrect postfix parsing.
This commit is contained in:
parent
a3e1fdd46e
commit
d26cb6283c
|
@ -406,6 +406,8 @@ libab_result _parse_expression(struct parser_state* state, libab_tree** store_in
|
||||||
new_type = EXPR_OP_PREFIX;
|
new_type = EXPR_OP_PREFIX;
|
||||||
} else if(new_token->type == TOKEN_OP_POSTFIX && _parser_can_postfix_follow(last_type)) {
|
} else if(new_token->type == TOKEN_OP_POSTFIX && _parser_can_postfix_follow(last_type)) {
|
||||||
result = _parser_append_op_node(state, new_token, &out_stack);
|
result = _parser_append_op_node(state, new_token, &out_stack);
|
||||||
|
_parser_state_step(state);
|
||||||
|
new_type = EXPR_OP_POSTFIX;
|
||||||
} else if(new_token->type == TOKEN_OP_INFIX) {
|
} else if(new_token->type == TOKEN_OP_INFIX) {
|
||||||
libab_operator* operator = _parser_find_operator(state, new_token);
|
libab_operator* operator = _parser_find_operator(state, new_token);
|
||||||
_parser_state_step(state);
|
_parser_state_step(state);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user