Commit message (Collapse) | Author | Files | Lines | ||
---|---|---|---|---|---|
2023-10-25 | Improve error for invalid name used in `endblock` | Guillaume Gomez | 1 | -1/+29 | |
2023-10-25 | Create `ErrorContext` type | Guillaume Gomez | 1 | -31/+45 | |
2023-09-28 | Pass `Node` parsing level to expressions | René Kijewski | 1 | -15/+15 | |
2023-09-28 | Limit nesting in parser nodes, too | René Kijewski | 1 | -4/+8 | |
2023-09-28 | Require Expr::parse() callers to supply Level | Dirkjan Ochtman | 1 | -6/+12 | |
2023-09-28 | Move Level into the crate root | Dirkjan Ochtman | 1 | -2/+1 | |
2023-09-28 | Yield a parser error when defining a macro named 'super' | Dirkjan Ochtman | 1 | -4/+5 | |
2023-09-28 | Limit expression nesting level to avoid stack overflows | Dirkjan Ochtman | 1 | -1/+2 | |
2023-08-03 | Parse paths and identifiers only once | René Kijewski | 1 | -3/+12 | |
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: fix white space issues in macro parsing | René Kijewski | 1 | -2/+2 | |
2023-08-01 | parser: import `parser::{Expr, Node}` | René Kijewski | 1 | -2/+2 | |
2023-08-01 | parser: `node::Loop` is much bigger than the other variants | René Kijewski | 1 | -2/+2 | |
2023-08-01 | parser: move test for completeness | René Kijewski | 1 | -6/+6 | |
2023-08-01 | parser: add type for `Node::Comment` | René Kijewski | 1 | -43/+57 | |
2023-08-01 | parser: add `expr::Loop::parse()` | René Kijewski | 1 | -68/+70 | |
2023-08-01 | parser: remove re-exports `parser::{node,expr}::*` | René Kijewski | 1 | -2/+2 | |
2023-08-01 | parser: add type for `Node::Extends` | René Kijewski | 1 | -7/+14 | |
2023-08-01 | parser: add type for `Node::Include` | René Kijewski | 1 | -12/+26 | |
2023-08-01 | parser: rename `Node::Cond` into `If` and add type | René Kijewski | 1 | -33/+47 | |
2023-08-01 | parser: add type for `Node::Let` | René Kijewski | 1 | -25/+33 | |
2023-08-01 | parser: add type for `Node::Raw` | René Kijewski | 1 | -28/+37 | |
2023-08-01 | parser: add type for `Node::Lit` | René Kijewski | 1 | -30/+47 | |
2023-08-01 | parser: add type for `Node::BlockDef` | René Kijewski | 1 | -29/+44 | |
2023-08-01 | parser: add type for `Node::Match` | René Kijewski | 1 | -35/+53 | |
2023-08-01 | parser: add type for `Node::Call` | René Kijewski | 1 | -19/+37 | |
2023-08-01 | parser: add type for `Node::Import` | René Kijewski | 1 | -16/+32 | |
2023-08-01 | parser: let `Macro` know its name | René Kijewski | 1 | -52/+53 | |
2023-08-01 | parser: remove panicking `From<&str> for Whitespace` | René Kijewski | 1 | -12/+5 | |
2023-07-31 | parser: rename block to nodes | Dirkjan Ochtman | 1 | -12/+13 | |
2023-07-31 | parser: reorder items in node module | Dirkjan Ochtman | 1 | -50/+50 | |
2023-07-31 | parser: flatten top-level Expr interface | Dirkjan Ochtman | 1 | -1/+1 | |
2023-07-31 | parser: move cond parsers into type impls | Dirkjan Ochtman | 1 | -39/+43 | |
2023-07-31 | parser: move parser helpers into callers | Dirkjan Ochtman | 1 | -35/+35 | |
2023-07-31 | parser: move when parsers into impl block | Dirkjan Ochtman | 1 | -47/+50 | |
2023-07-31 | parser: define a struct for Match | Dirkjan Ochtman | 1 | -3/+22 | |
2023-07-31 | parser: define a struct for Cond | Dirkjan Ochtman | 1 | -3/+19 | |
2023-07-31 | parser: move node parsers into impl block | Dirkjan Ochtman | 1 | -388/+404 | |
2023-07-31 | parser: move Whitespace parser into method | Dirkjan Ochtman | 1 | -144/+142 | |
2023-07-31 | parser: move impl blocks closer to type definitions | Dirkjan Ochtman | 1 | -12/+12 | |
2023-07-31 | parser: move helper functions into State impl | Dirkjan Ochtman | 1 | -32/+31 | |
2023-07-31 | parser: move trait impl closer to type definition | Dirkjan Ochtman | 1 | -0/+11 | |
2023-07-31 | Extract askama_parser crate | Dirkjan Ochtman | 1 | -23/+23 | |
2023-07-31 | derive: move whitespace conversion into config module | Dirkjan Ochtman | 1 | -11/+0 | |
2023-06-12 | Allow macros to be defined and called without arguments | mataha | 1 | -2/+5 | |
This commit introduces a shorthand for defining and calling macros when using them as a reusable substitute for variables assigned complex values (e.g. string literals with or without newline escapes). The use-case is formatting - from my experience it's easier to visually parse a `macro` `endmacro` block than a multiline variable assignment. Signed-off-by: mataha <mataha@users.noreply.github.com> | |||||
2023-03-09 | Fix handling of trailing whitespace characters | Guillaume Gomez | 1 | -0/+11 | |
2023-02-21 | Revert "derive: Make Config `'static`" | René Kijewski | 1 | -2/+2 | |
2023-01-30 | derive: refactor parser | René Kijewski | 1 | -0/+671 | |
`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. |