aboutsummaryrefslogtreecommitdiffstats
path: root/askama_parser/src/tests.rs (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-07-31 Fix parsing arraysLibravatar René Kijewski1-0/+83
This change * allows using empty arrays `[]` in expessions, * adds a cut when the leading `[` was encountered, and * fixes the interaction between arrays and boolean OR. IMO the restriction that you couldn't use empty arrays is not needed. The missing cut made error messages slictly worse if you forget to add the closing `]`. Filter expressions must not have white spaces before the pipe `|`. The white space is used to tell a filter expressions, and `std::ops::Or` apart.
2023-07-31 Fix parsing callsLibravatar René Kijewski1-1/+26
This change: * adds a cut when the leading `(` was encountered, and * fixed the interaction between call expressions and boolean OR.
2023-07-31parser: add top-level Ast typeLibravatar Dirkjan Ochtman1-82/+108
2023-07-31Extract askama_parser crateLibravatar Dirkjan Ochtman1-0/+0
2023-07-31derive: define separate ParseError typeLibravatar Dirkjan Ochtman1-2/+2
2023-07-31derive: move Syntax into parser moduleLibravatar Dirkjan Ochtman1-2/+1
2023-07-24Fix Rust macro invocations not accepting a path (#837)Libravatar Matthew Taylor1-0/+45
2023-02-21Revert "derive: Make Config `'static`"Libravatar René Kijewski1-2/+2
2023-01-30derive: refactor parserLibravatar René Kijewski1-0/+668
`parser.rs` was a single file containing almost 2000 lines. This PR split the file into multiple, smaller files. `Expr`, `Node`, and `Target` each get an own file. Each struct gets a `parse()` method that return `Result<Self>`, and every other detail is private to the file. This PR should make this essential part of Askama more easy to understand, and make future modifications easier.