Skip to content

Commit

Permalink
Fix nested function (#159)
Browse files Browse the repository at this point in the history
* switched order in token::kind::id of function and operator behavior

* add tests

* fixed nested function order

* created single include

Co-authored-by: pantor <lars.berscheid@online.de>
  • Loading branch information
DeiRex75 and pantor authored Aug 4, 2020
1 parent b141129 commit 222fc96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/inja/parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ class Parser {
}

function_stack.pop();

current_expression_list->rpn_output.emplace_back(operator_stack.top());
operator_stack.pop();
}
}
default:
Expand Down
3 changes: 3 additions & 0 deletions single_include/inja/inja.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3001,6 +3001,9 @@ class Parser {
}

function_stack.pop();

current_expression_list->rpn_output.emplace_back(operator_stack.top());
operator_stack.pop();
}
}
default:
Expand Down

0 comments on commit 222fc96

Please sign in to comment.