aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src/parser (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-07-31derive: move Syntax into parser moduleLibravatar Dirkjan Ochtman2-3/+24
2023-07-24Fix Rust macro invocations not accepting a path (#837)Libravatar Matthew Taylor2-14/+69
2023-06-28Parse templates onceLibravatar Dirkjan Ochtman1-4/+1
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
2023-02-24Fix typosLibravatar René Kijewski1-11/+11
2023-02-21Revert "derive: Make Config `'static`"Libravatar René Kijewski3-17/+20
2023-01-30derive: refactor parserLibravatar René Kijewski4-0/+1999
`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.