Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix parsing arrays | René Kijewski | 2023-07-31 | 4 | -12/+93 |
| | | | | | | | | | | | | | | | | 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. | ||||
* | Fix parsing calls | René Kijewski | 2023-07-31 | 3 | -6/+33 |
| | | | | | | | This change: * adds a cut when the leading `(` was encountered, and * fixed the interaction between call expressions and boolean OR. | ||||
* | CI: make sure parser is tested | René Kijewski | 2023-07-31 | 1 | -3/+3 |
| | |||||
* | parser: rename block to nodes | Dirkjan Ochtman | 2023-07-31 | 3 | -18/+21 |
| | |||||
* | parser: reorder items in node module | Dirkjan Ochtman | 2023-07-31 | 1 | -50/+50 |
| | |||||
* | parser: move Expr parser helpers into callers | Dirkjan Ochtman | 2023-07-31 | 1 | -53/+54 |
| | |||||
* | parser: move single expr parsers into Expr impl | Dirkjan Ochtman | 2023-07-31 | 1 | -63/+63 |
| | |||||
* | parser: move binary operator parsers into Expr impl | Dirkjan Ochtman | 2023-07-31 | 1 | -71/+71 |
| | |||||
* | parser: flatten top-level Expr interface | Dirkjan Ochtman | 2023-07-31 | 2 | -36/+28 |
| | |||||
* | parser: move suffix parsers into impl block | Dirkjan Ochtman | 2023-07-31 | 1 | -53/+61 |
| | |||||
* | parser: move cond parsers into type impls | Dirkjan Ochtman | 2023-07-31 | 1 | -39/+43 |
| | |||||
* | parser: move parser helpers into callers | Dirkjan Ochtman | 2023-07-31 | 1 | -35/+35 |
| | |||||
* | parser: move when parsers into impl block | Dirkjan Ochtman | 2023-07-31 | 1 | -47/+50 |
| | |||||
* | parser: define a struct for Match | Dirkjan Ochtman | 2023-07-31 | 3 | -9/+27 |
| | |||||
* | parser: define a struct for Cond | Dirkjan Ochtman | 2023-07-31 | 3 | -9/+25 |
| | |||||
* | parser: move node parsers into impl block | Dirkjan Ochtman | 2023-07-31 | 2 | -410/+406 |
| | |||||
* | parser: move Whitespace parser into method | Dirkjan Ochtman | 2023-07-31 | 1 | -144/+142 |
| | |||||
* | parser: move impl blocks closer to type definitions | Dirkjan Ochtman | 2023-07-31 | 1 | -12/+12 |
| | |||||
* | parser: simplify top-level parser match | Dirkjan Ochtman | 2023-07-31 | 1 | -29/+24 |
| | |||||
* | parser: add top-level Ast type | Dirkjan Ochtman | 2023-07-31 | 2 | -115/+148 |
| | |||||
* | parser: move nested_parenthesis() helper into node module | Dirkjan Ochtman | 2023-07-31 | 2 | -51/+49 |
| | |||||
* | parser: move helper functions into State impl | Dirkjan Ochtman | 2023-07-31 | 2 | -93/+92 |
| | |||||
* | parser: move trait impl closer to type definition | Dirkjan Ochtman | 2023-07-31 | 2 | -11/+11 |
| | |||||
* | parser: move single-use functions into caller | Dirkjan Ochtman | 2023-07-31 | 1 | -13/+13 |
| | |||||
* | Extract askama_parser crate | Dirkjan Ochtman | 2023-07-31 | 12 | -46/+68 |
| | |||||
* | derive: move whitespace conversion into config module | Dirkjan Ochtman | 2023-07-31 | 2 | -12/+11 |
| | |||||
* | derive: move Parsed into parser module | Dirkjan Ochtman | 2023-07-31 | 2 | -36/+35 |
| | |||||
* | derive: move generator-specific methods out of Expr | Dirkjan Ochtman | 2023-07-31 | 2 | -73/+71 |
| | |||||
* | derive: define separate ParseError type | Dirkjan Ochtman | 2023-07-31 | 4 | -9/+32 |
| | |||||
* | derive: move Syntax into parser module | Dirkjan Ochtman | 2023-07-31 | 5 | -40/+38 |
| | |||||
* | Fix Rust macro invocations not accepting a path (#837) | Matthew Taylor | 2023-07-24 | 5 | -19/+95 |
| | |||||
* | There's no mention of name afterwards | Justin Abrahms | 2023-07-21 | 1 | -1/+1 |
| | |||||
* | fix clippy::items-after-test-module error (#839) | Matthew Taylor | 2023-07-14 | 1 | -9/+9 |
| | |||||
* | Cache include AST to reduce parsing overhead | Dirkjan Ochtman | 2023-06-28 | 1 | -23/+16 |
| | |||||
* | Inline child() method to avoid borrowing all fields | Dirkjan Ochtman | 2023-06-28 | 1 | -27/+23 |
| | |||||
* | Avoid reparsing included templates if possible | Dirkjan Ochtman | 2023-06-28 | 1 | -4/+23 |
| | |||||
* | Parse templates once | Dirkjan Ochtman | 2023-06-28 | 3 | -18/+45 |
| | |||||
* | Add section for performance tips | wrapperup | 2023-06-28 | 2 | -0/+17 |
| | |||||
* | Added example on how to use super() | reportingissue | 2023-06-21 | 1 | -1/+2 |
| | |||||
* | Update mendes requirement from 0.2.0 to 0.3.0 | dependabot[bot] | 2023-06-13 | 1 | -1/+1 |
| | | | | | | | | | | | | Updates the requirements on [mendes](https://github.com/djc/mendes) to permit the latest version. - [Commits](https://github.com/djc/mendes/commits) --- updated-dependencies: - dependency-name: mendes dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> | ||||
* | Allow macros to be defined and called without arguments | mataha | 2023-06-12 | 3 | -2/+36 |
| | | | | | | | | | | 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> | ||||
* | Allow delimiters with arbitrary length | René Kijewski | 2023-05-31 | 2 | -18/+96 |
| | |||||
* | Update criterion requirement from 0.4 to 0.5 | dependabot[bot] | 2023-05-24 | 2 | -2/+2 |
| | | | | | | | | | | | | | Updates the requirements on [criterion](https://github.com/bheisler/criterion.rs) to permit the latest version. - [Changelog](https://github.com/bheisler/criterion.rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/bheisler/criterion.rs/compare/0.4.0...0.5.0) --- updated-dependencies: - dependency-name: criterion dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> | ||||
* | Upgrade to comrak 0.18 | Dirkjan Ochtman | 2023-05-20 | 3 | -2/+3 |
| | |||||
* | Update to rocket 0.5-rc.3 | Vypo Mouse | 2023-05-19 | 3 | -7/+22 |
| | |||||
* | Improve whitespace documentation | Raimundo Saona | 2023-04-03 | 1 | -2/+27 |
| | |||||
* | Re-export `askama::*` in `askama_tide` (#802) | René Kijewski | 2023-04-01 | 2 | -2/+2 |
| | | | | Every integration crate but `askama_tide` exports `askama::*`. This PR makes `askama_tide` behave the same as every other `integration crate`. | ||||
* | Use `try_reserve()` instead of `with_capacity()` | René Kijewski | 2023-03-31 | 1 | -1/+2 |
| | | | | | | | | | | | | | | `String::with_capacity()` panics if the requested memory could not be allocated. `Template::render()` is fallible method, and the fact that it can panic is not documented. This commit uses `String::try_reserve()` instead, so even for an exceedingly large `SIZE_HINT` the method should not panic. In the generated code `write!()` calls will fail instead with `Err(std::fmt::Error)`. I do not test if `try_reserve()` returned an error, because the rendering might succeed anyway, if less bytes are written than estimated. | ||||
* | Template::SIZE_HINT: add documentation | Jacob Hoffman-Andrews | 2023-03-31 | 1 | -1/+9 |
| | |||||
* | Use lookup table | René Kijewski | 2023-03-30 | 1 | -5/+13 |
| |