Commit message (Collapse) | Author | Files | Lines | ||
---|---|---|---|---|---|
2024-01-17 | Improve performance of `find_used_templates` | max | 1 | -1/+2 | |
Signed-off-by: max <gmx.sht@gmail.com> | |||||
2023-12-07 | Undo an accidental deletion of `#[derive(Debug)]` | max | 1 | -0/+1 | |
Signed-off-by: max <gmx.sht@gmail.com> | |||||
2023-12-07 | Added testing for reserved variable names | max | 1 | -1/+0 | |
Signed-off-by: max <gmx.sht@gmail.com> | |||||
2023-11-22 | Add better support for rust-like number literals (#908) | PizzasBear | 1 | -5/+65 | |
Signed-off-by: max <gmx.sht@gmail.com> | |||||
2023-10-25 | Create a type alias for all `IResult` to simplify code reading | Guillaume Gomez | 1 | -37/+34 | |
2023-10-25 | Improve error for invalid name used in `endblock` | Guillaume Gomez | 1 | -1/+1 | |
2023-10-25 | Create `ErrorContext` type | Guillaume Gomez | 1 | -31/+97 | |
2023-09-28 | Pass `Node` parsing level to expressions | René Kijewski | 1 | -1/+1 | |
2023-09-28 | Limit nesting in parser nodes, too | René Kijewski | 1 | -0/+15 | |
2023-09-28 | Move Level into the crate root | Dirkjan Ochtman | 1 | -0/+15 | |
2023-08-03 | Parse paths and identifiers only once | René Kijewski | 1 | -24/+31 | |
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: allow negative numbers in patterns | René Kijewski | 1 | -1/+5 | |
2023-08-02 | parser: better error message for unknown nodes | René Kijewski | 1 | -8/+7 | |
2023-08-01 | parser: remove re-exports `parser::{node,expr}::*` | René Kijewski | 1 | -9/+6 | |
2023-08-01 | parser: add type for `Node::Extends` | René Kijewski | 1 | -2/+2 | |
2023-08-01 | parser: add type for `Node::Include` | René Kijewski | 1 | -2/+2 | |
2023-08-01 | parser: rename `Node::Cond` into `If` and add type | René Kijewski | 1 | -2/+2 | |
2023-08-01 | parser: add type for `Node::Let` | René Kijewski | 1 | -1/+1 | |
2023-08-01 | parser: add type for `Node::Raw` | René Kijewski | 1 | -1/+1 | |
2023-08-01 | parser: add type for `Node::Lit` | René Kijewski | 1 | -8/+2 | |
2023-08-01 | parser: add type for `Node::BlockDef` | René Kijewski | 1 | -1/+1 | |
2023-08-01 | parser: add type for `Node::Match` | René Kijewski | 1 | -1/+1 | |
2023-08-01 | parser: add type for `Node::Call` | René Kijewski | 1 | -1/+3 | |
2023-08-01 | parser: add type for `Node::Import` | René Kijewski | 1 | -1/+1 | |
2023-08-01 | parser: add `Ast::nodes()` method | René Kijewski | 1 | -0/+4 | |
2023-08-01 | parser: impement `PartialEq` for `Ast` | René Kijewski | 1 | -0/+7 | |
2023-08-01 | parser: implement `Debug` for `Parsed` | René Kijewski | 1 | -1/+9 | |
2023-08-01 | parser: use `?` | René Kijewski | 1 | -5/+1 | |
2023-08-01 | parser: ensure correct drop order for `Parsed` | René Kijewski | 1 | -2/+3 | |
According to [RFC 1857] the fields of a struct are dropped in the same order as they are declared. For `struct S { a: A, b: B }` field `a` is dropped before field `b`. Our struct `Parsed` is self referencial. Its field `ast` depends on `source`, so `source` must outlife `ast`. This PR changes the order of the fields to reflect this requirement. In practice it should not matter, because we know that the variant of `Node` won't access the string data during their `Drop`, but better safe than sorry - maybe `Node` changes in the future. [RFC 1857]: https://rust-lang.github.io/rfcs/1857-stabilize-drop-order.html | |||||
2023-07-31 | parser: move node parsers into impl block | Dirkjan Ochtman | 1 | -22/+2 | |
2023-07-31 | parser: simplify top-level parser match | Dirkjan Ochtman | 1 | -29/+24 | |
2023-07-31 | parser: add top-level Ast type | Dirkjan Ochtman | 1 | -33/+40 | |
2023-07-31 | parser: move nested_parenthesis() helper into node module | Dirkjan Ochtman | 1 | -48/+0 | |
2023-07-31 | parser: move helper functions into State impl | Dirkjan Ochtman | 1 | -61/+61 | |
2023-07-31 | parser: move trait impl closer to type definition | Dirkjan Ochtman | 1 | -11/+0 | |
2023-07-31 | parser: move single-use functions into caller | Dirkjan Ochtman | 1 | -13/+13 | |
2023-07-31 | Extract askama_parser crate | Dirkjan Ochtman | 1 | -15/+18 | |
2023-07-31 | derive: move Parsed into parser module | Dirkjan Ochtman | 1 | -0/+34 | |
2023-07-31 | derive: define separate ParseError type | Dirkjan Ochtman | 1 | -6/+17 | |
2023-07-31 | derive: move Syntax into parser module | Dirkjan Ochtman | 1 | -1/+23 | |
2023-06-28 | Parse templates once | Dirkjan Ochtman | 1 | -4/+1 | |
2023-02-21 | Revert "derive: Make Config `'static`" | René Kijewski | 1 | -13/+16 | |
2023-01-30 | derive: refactor parser | René Kijewski | 1 | -0/+314 | |
`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. |