aboutsummaryrefslogtreecommitdiffstats
path: root/askama_parser/src/node.rs (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-11-22Enhance match to include multiple targets (#911)Libravatar PizzasBear1-0/+13
Signed-off-by: max <gmx.sht@gmail.com>
2023-11-13Derive Clone for Expr and TargetLibravatar Andrew Dona-Couch1-1/+1
2023-10-25Create a type alias for all `IResult` to simplify code readingLibravatar Guillaume Gomez1-42/+33
2023-10-25Improve error for `elif` keywordLibravatar Guillaume Gomez1-1/+9
2023-10-25 Improve error for invalid name used in `endmacro`Libravatar Guillaume Gomez1-1/+7
2023-10-25Improve error for invalid name used in `endblock`Libravatar Guillaume Gomez1-1/+29
2023-10-25Create `ErrorContext` typeLibravatar Guillaume Gomez1-31/+45
2023-09-28Pass `Node` parsing level to expressionsLibravatar René Kijewski1-15/+15
2023-09-28Limit nesting in parser nodes, tooLibravatar René Kijewski1-4/+8
2023-09-28Require Expr::parse() callers to supply LevelLibravatar Dirkjan Ochtman1-6/+12
2023-09-28Move Level into the crate rootLibravatar Dirkjan Ochtman1-2/+1
2023-09-28Yield a parser error when defining a macro named 'super'Libravatar Dirkjan Ochtman1-4/+5
2023-09-28Limit expression nesting level to avoid stack overflowsLibravatar Dirkjan Ochtman1-1/+2
2023-08-03Parse paths and identifiers only onceLibravatar René Kijewski1-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-02parser: fix white space issues in macro parsingLibravatar René Kijewski1-2/+2
2023-08-01parser: import `parser::{Expr, Node}`Libravatar René Kijewski1-2/+2
2023-08-01parser: `node::Loop` is much bigger than the other variantsLibravatar René Kijewski1-2/+2
2023-08-01parser: move test for completenessLibravatar René Kijewski1-6/+6
2023-08-01parser: add type for `Node::Comment`Libravatar René Kijewski1-43/+57
2023-08-01parser: add `expr::Loop::parse()`Libravatar René Kijewski1-68/+70
2023-08-01parser: remove re-exports `parser::{node,expr}::*`Libravatar René Kijewski1-2/+2
2023-08-01parser: add type for `Node::Extends`Libravatar René Kijewski1-7/+14
2023-08-01parser: add type for `Node::Include`Libravatar René Kijewski1-12/+26
2023-08-01parser: rename `Node::Cond` into `If` and add typeLibravatar René Kijewski1-33/+47
2023-08-01parser: add type for `Node::Let`Libravatar René Kijewski1-25/+33
2023-08-01parser: add type for `Node::Raw`Libravatar René Kijewski1-28/+37
2023-08-01parser: add type for `Node::Lit`Libravatar René Kijewski1-30/+47
2023-08-01parser: add type for `Node::BlockDef`Libravatar René Kijewski1-29/+44
2023-08-01parser: add type for `Node::Match`Libravatar René Kijewski1-35/+53
2023-08-01parser: add type for `Node::Call`Libravatar René Kijewski1-19/+37
2023-08-01parser: add type for `Node::Import`Libravatar René Kijewski1-16/+32
2023-08-01parser: let `Macro` know its nameLibravatar René Kijewski1-52/+53
2023-08-01parser: remove panicking `From<&str> for Whitespace`Libravatar René Kijewski1-12/+5
2023-07-31parser: rename block to nodesLibravatar Dirkjan Ochtman1-12/+13
2023-07-31parser: reorder items in node moduleLibravatar Dirkjan Ochtman1-50/+50
2023-07-31parser: flatten top-level Expr interfaceLibravatar Dirkjan Ochtman1-1/+1
2023-07-31parser: move cond parsers into type implsLibravatar Dirkjan Ochtman1-39/+43
2023-07-31parser: move parser helpers into callersLibravatar Dirkjan Ochtman1-35/+35
2023-07-31parser: move when parsers into impl blockLibravatar Dirkjan Ochtman1-47/+50
2023-07-31parser: define a struct for MatchLibravatar Dirkjan Ochtman1-3/+22
2023-07-31parser: define a struct for CondLibravatar Dirkjan Ochtman1-3/+19
2023-07-31parser: move node parsers into impl blockLibravatar Dirkjan Ochtman1-388/+404
2023-07-31parser: move Whitespace parser into methodLibravatar Dirkjan Ochtman1-144/+142
2023-07-31parser: move impl blocks closer to type definitionsLibravatar Dirkjan Ochtman1-12/+12
2023-07-31parser: move helper functions into State implLibravatar Dirkjan Ochtman1-32/+31
2023-07-31parser: move trait impl closer to type definitionLibravatar Dirkjan Ochtman1-0/+11
2023-07-31Extract askama_parser crateLibravatar Dirkjan Ochtman1-23/+23
2023-07-31derive: move whitespace conversion into config moduleLibravatar Dirkjan Ochtman1-11/+0
2023-06-12Allow macros to be defined and called without argumentsLibravatar mataha1-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-09Fix handling of trailing whitespace charactersLibravatar Guillaume Gomez1-0/+11