inja
inja copied to clipboard
Fix issue 246
Close #246
This pull request consists of three commits.
-
The first commit adds the following method to
Parser
and use it in theparse_expression
method with two arguments.std::shared_ptr<ExpressionNode> parse_expression(Template& tmpl)
The method with one argument returns when unexpected token is found.
-
The second fixes #246.
parse_expression
with one argument is called recursively for each argument. -
The third is optional. If you don't prefer it, I'll revert it. It calls
parse_expression
with one argument after a left parenthesis instead of counting the nested level bycurrent_paren_level
.