aboutsummaryrefslogtreecommitdiffstats
path: root/askama_parser/src/expr.rs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Yield error on deep AST recursionLibravatar Dirkjan Ochtman2024-01-181-3/+9
|
* Allow trailing comma in macro definition and callLibravatar Guillaume Gomez2023-12-071-1/+1
|
* Allow to pass named arguments to macro callsLibravatar Guillaume Gomez2023-11-281-5/+74
|
* Derive Clone for Expr and TargetLibravatar Andrew Dona-Couch2023-11-131-1/+1
|
* Create a type alias for all `IResult` to simplify code readingLibravatar Guillaume Gomez2023-10-251-29/+23
|
* Create `ErrorContext` typeLibravatar Guillaume Gomez2023-10-251-33/+41
|
* Require Expr::parse() callers to supply LevelLibravatar Dirkjan Ochtman2023-09-281-10/+6
|
* Move Level into the crate rootLibravatar Dirkjan Ochtman2023-09-281-16/+1
|
* Limit expression nesting level to avoid stack overflowsLibravatar Dirkjan Ochtman2023-09-281-33/+81
|
* Use char_indices() to get byte indices for charactersLibravatar Dirkjan Ochtman2023-09-111-1/+1
|
* Rename some variablesLibravatar Dirkjan Ochtman2023-09-111-7/+7
|
* Optimize parsing boolean literals, tooLibravatar René Kijewski2023-08-031-9/+5
|
* Parse paths and identifiers only onceLibravatar René Kijewski2023-08-031-10/+10
| | | | | | | | | | | | | | In the old implementation each variable in an expression would be parsed up to three times: * Try to parse a path because it contains a leading double colon, or infix double colons. * Try to parse it as path again by scanning for an identifier that contains an upper case character. * Fall back to scanning for any identifier. This PR turns all three steps into one, without the need for backtracking.
* parser: don't truncates whitespaces after arraysLibravatar René Kijewski2023-08-021-1/+1
|
* Fix parsing arraysLibravatar René Kijewski2023-07-311-5/+7
| | | | | | | | | | | | | | | | 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.
* Fix parsing callsLibravatar René Kijewski2023-07-311-3/+5
| | | | | | | This change: * adds a cut when the leading `(` was encountered, and * fixed the interaction between call expressions and boolean OR.
* parser: move Expr parser helpers into callersLibravatar Dirkjan Ochtman2023-07-311-53/+54
|
* parser: move single expr parsers into Expr implLibravatar Dirkjan Ochtman2023-07-311-63/+63
|
* parser: move binary operator parsers into Expr implLibravatar Dirkjan Ochtman2023-07-311-71/+71
|
* parser: flatten top-level Expr interfaceLibravatar Dirkjan Ochtman2023-07-311-35/+27
|
* parser: move suffix parsers into impl blockLibravatar Dirkjan Ochtman2023-07-311-53/+61
|
* parser: move nested_parenthesis() helper into node moduleLibravatar Dirkjan Ochtman2023-07-311-3/+49
|
* Extract askama_parser crateLibravatar Dirkjan Ochtman2023-07-311-0/+285