Commit message (Collapse) | Author | Files | Lines | ||
---|---|---|---|---|---|
2023-11-28 | Allow to pass named arguments to macro calls | Guillaume Gomez | 1 | -5/+74 | |
2023-11-13 | Derive Clone for Expr and Target | Andrew Dona-Couch | 1 | -1/+1 | |
2023-10-25 | Create a type alias for all `IResult` to simplify code reading | Guillaume Gomez | 1 | -29/+23 | |
2023-10-25 | Create `ErrorContext` type | Guillaume Gomez | 1 | -33/+41 | |
2023-09-28 | Require Expr::parse() callers to supply Level | Dirkjan Ochtman | 1 | -10/+6 | |
2023-09-28 | Move Level into the crate root | Dirkjan Ochtman | 1 | -16/+1 | |
2023-09-28 | Limit expression nesting level to avoid stack overflows | Dirkjan Ochtman | 1 | -33/+81 | |
2023-09-11 | Use char_indices() to get byte indices for characters | Dirkjan Ochtman | 1 | -1/+1 | |
2023-09-11 | Rename some variables | Dirkjan Ochtman | 1 | -7/+7 | |
2023-08-03 | Optimize parsing boolean literals, too | René Kijewski | 1 | -9/+5 | |
2023-08-03 | Parse paths and identifiers only once | René Kijewski | 1 | -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. | |||||
2023-08-02 | parser: don't truncates whitespaces after arrays | René Kijewski | 1 | -1/+1 | |
2023-07-31 | Fix parsing arrays | René Kijewski | 1 | -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. | |||||
2023-07-31 | Fix parsing calls | René Kijewski | 1 | -3/+5 | |
This change: * adds a cut when the leading `(` was encountered, and * fixed the interaction between call expressions and boolean OR. | |||||
2023-07-31 | parser: move Expr parser helpers into callers | Dirkjan Ochtman | 1 | -53/+54 | |
2023-07-31 | parser: move single expr parsers into Expr impl | Dirkjan Ochtman | 1 | -63/+63 | |
2023-07-31 | parser: move binary operator parsers into Expr impl | Dirkjan Ochtman | 1 | -71/+71 | |
2023-07-31 | parser: flatten top-level Expr interface | Dirkjan Ochtman | 1 | -35/+27 | |
2023-07-31 | parser: move suffix parsers into impl block | Dirkjan Ochtman | 1 | -53/+61 | |
2023-07-31 | parser: move nested_parenthesis() helper into node module | Dirkjan Ochtman | 1 | -3/+49 | |
2023-07-31 | Extract askama_parser crate | Dirkjan Ochtman | 1 | -1/+1 | |
2023-07-31 | derive: move generator-specific methods out of Expr | Dirkjan Ochtman | 1 | -71/+0 | |
2023-07-24 | Fix Rust macro invocations not accepting a path (#837) | Matthew Taylor | 1 | -14/+24 | |
2023-02-24 | Fix typos | René Kijewski | 1 | -11/+11 | |
2023-01-30 | derive: refactor parser | René Kijewski | 1 | -0/+346 | |
`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. |