From 222fc960be465003c1089a623cf251cc9dd2a63b Mon Sep 17 00:00:00 2001 From: DeiRex75 Date: Tue, 4 Aug 2020 23:20:37 +0200 Subject: [PATCH] Fix nested function (#159) * switched order in token::kind::id of function and operator behavior * add tests * fixed nested function order * created single include Co-authored-by: pantor --- include/inja/parser.hpp | 3 +++ single_include/inja/inja.hpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/include/inja/parser.hpp b/include/inja/parser.hpp index 348f315e..b22e04d3 100644 --- a/include/inja/parser.hpp +++ b/include/inja/parser.hpp @@ -289,6 +289,9 @@ class Parser { } function_stack.pop(); + + current_expression_list->rpn_output.emplace_back(operator_stack.top()); + operator_stack.pop(); } } default: diff --git a/single_include/inja/inja.hpp b/single_include/inja/inja.hpp index ec9937da..45595d06 100644 --- a/single_include/inja/inja.hpp +++ b/single_include/inja/inja.hpp @@ -3001,6 +3001,9 @@ class Parser { } function_stack.pop(); + + current_expression_list->rpn_output.emplace_back(operator_stack.top()); + operator_stack.pop(); } } default: