aboutsummaryrefslogtreecommitdiffstats
path: root/testing/templates/precedence.html (unfollow)
Commit message (Collapse)AuthorFilesLines
2017-09-03Changed implementation of precedence rulesLibravatar Lars Erik Rosengren1-0/+7
This implementation resolves djc/askama#44 by changing the precedence implementation. The previous solution was very slow because it had to try to parse all combinations of precedence layers leading to 2^9 iterations for each expr_any. This is solved by reusing the left operand instead of reparsing it when the operator isn't found. This implementation also solves another related issue that expressions with multiple operators couldn't be parsed, for example {{1 * 2 * 3}}. This is handled by using expr_any for the right operand instead of only using higher level precedence layers.