aboutsummaryrefslogtreecommitdiffstats
path: root/askama_shared/src/parser.rs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Code cleanups as suggested by ClippyLibravatar Dirkjan Ochtman2017-09-061-4/+4
|
* Stop mutating parsed AST for code generationLibravatar Dirkjan Ochtman2017-09-051-1/+0
|
* Refactor handling of macrosLibravatar Dirkjan Ochtman2017-09-051-5/+15
|
* Clean up and tighten faster version of expr_prec_layer macroLibravatar Dirkjan Ochtman2017-09-041-15/+10
|
* Changed implementation of precedence rulesLibravatar Lars Erik Rosengren2017-09-031-6/+12
| | | | | | | | | | | | | | 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.
* Move most of the code into new askama_shared crateLibravatar Dirkjan Ochtman2017-08-271-0/+471
This makes it possible to share code between askama and askama_derive.