aboutsummaryrefslogtreecommitdiffstats
path: root/testing/templates/format.html
diff options
context:
space:
mode:
authorLibravatar Lars Erik Rosengren <larserik.rosengren@gmail.com>2017-09-03 18:07:55 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-09-03 19:08:53 +0200
commit986535fc958c0d19c10fd6fc5781fe0b2dcdd442 (patch)
tree605e5ba6efd2c87f4f73026ec45b360e176fa1bf /testing/templates/format.html
parent7d2d7718aa8467ddd5ca9753bde2c7a87ff55c9f (diff)
downloadaskama-986535fc958c0d19c10fd6fc5781fe0b2dcdd442.tar.gz
askama-986535fc958c0d19c10fd6fc5781fe0b2dcdd442.tar.bz2
askama-986535fc958c0d19c10fd6fc5781fe0b2dcdd442.zip
Changed implementation of precedence rules
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.
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions