inja icon indicating copy to clipboard operation
inja copied to clipboard

Fix issue 246

Open kubo opened this issue 2 years ago • 0 comments

Close #246

This pull request consists of three commits.

  1. The first commit adds the following method to Parser and use it in the parse_expression method with two arguments.

    std::shared_ptr<ExpressionNode> parse_expression(Template& tmpl)
    

    The method with one argument returns when unexpected token is found.

  2. The second fixes #246. parse_expression with one argument is called recursively for each argument.

  3. 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 by current_paren_level.

kubo avatar Jun 28 '22 00:06 kubo