Commit message (Collapse) | Author | Files | Lines | ||
---|---|---|---|---|---|
2023-12-07 | Allow trailing comma in macro definition and call | 1 | -1/+1 | ||
2023-11-28 | Allow to pass named arguments to macro calls | 1 | -5/+74 | ||
2023-11-13 | Derive Clone for Expr and Target | 1 | -1/+1 | ||
2023-10-25 | Create a type alias for all `IResult` to simplify code reading | 1 | -29/+23 | ||
2023-10-25 | Create `ErrorContext` type | 1 | -33/+41 | ||
2023-09-28 | Require Expr::parse() callers to supply Level | 1 | -10/+6 | ||
2023-09-28 | Move Level into the crate root | 1 | -16/+1 | ||
2023-09-28 | Limit expression nesting level to avoid stack overflows | 1 | -33/+81 | ||
2023-09-11 | Use char_indices() to get byte indices for characters | 1 | -1/+1 | ||
2023-09-11 | Rename some variables | 1 | -7/+7 | ||
2023-08-03 | Optimize parsing boolean literals, too | 1 | -9/+5 | ||
2023-08-03 | Parse paths and identifiers only once | 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 | 1 | -1/+1 | ||
2023-07-31 | Fix parsing arrays | 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 | 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 | 1 | -53/+54 | ||
2023-07-31 | parser: move single expr parsers into Expr impl | 1 | -63/+63 | ||
2023-07-31 | parser: move binary operator parsers into Expr impl | 1 | -71/+71 | ||
2023-07-31 | parser: flatten top-level Expr interface | 1 | -35/+27 | ||
2023-07-31 | parser: move suffix parsers into impl block | 1 | -53/+61 | ||
2023-07-31 | parser: move nested_parenthesis() helper into node module | 1 | -3/+49 | ||
2023-07-31 | Extract askama_parser crate | 1 | -1/+1 | ||
2023-07-31 | derive: move generator-specific methods out of Expr | 1 | -71/+0 | ||
2023-07-24 | Fix Rust macro invocations not accepting a path (#837) | 1 | -14/+24 | ||
2023-02-24 | Fix typos | 1 | -11/+11 | ||
2023-01-30 | derive: refactor parser | 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. |