From 2823b0b66bf61554cf3bc640593c503ae7b5d521 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Mon, 26 Feb 2018 13:51:37 -0800 Subject: [PATCH] Fix bug in order of operations processing. --- src/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser.c b/src/parser.c index 58f33b9..4f2fb8b 100644 --- a/src/parser.c +++ b/src/parser.c @@ -476,7 +476,7 @@ libab_result _parse_expression(struct parser_state* state, libab_tree** store_in while(result == LIBAB_SUCCESS && op_stack.tail && _parser_match_is_op(op_stack.tail->data)) { - libab_operator* other_operator = _parser_find_operator(state, new_token); + libab_operator* other_operator = _parser_find_operator(state, op_stack.tail->data); if(new_token->type == TOKEN_OP_PREFIX || (operator->associativity == -1 &&