aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix parsing callsLibravatar René Kijewski2023-07-313-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 testedLibravatar René Kijewski2023-07-311-3/+3
|
* parser: rename block to nodesLibravatar Dirkjan Ochtman2023-07-313-18/+21
|
* parser: reorder items in node moduleLibravatar Dirkjan Ochtman2023-07-311-50/+50
|
* parser: move Expr parser helpers into callersLibravatar Dirkjan Ochtman2023-07-311-53/+54
|
* parser: move single expr parsers into Expr implLibravatar Dirkjan Ochtman2023-07-311-63/+63
|
* parser: move binary operator parsers into Expr implLibravatar Dirkjan Ochtman2023-07-311-71/+71
|
* parser: flatten top-level Expr interfaceLibravatar Dirkjan Ochtman2023-07-312-36/+28
|
* parser: move suffix parsers into impl blockLibravatar Dirkjan Ochtman2023-07-311-53/+61
|
* parser: move cond parsers into type implsLibravatar Dirkjan Ochtman2023-07-311-39/+43
|
* parser: move parser helpers into callersLibravatar Dirkjan Ochtman2023-07-311-35/+35
|
* parser: move when parsers into impl blockLibravatar Dirkjan Ochtman2023-07-311-47/+50
|
* parser: define a struct for MatchLibravatar Dirkjan Ochtman2023-07-313-9/+27
|
* parser: define a struct for CondLibravatar Dirkjan Ochtman2023-07-313-9/+25
|
* parser: move node parsers into impl blockLibravatar Dirkjan Ochtman2023-07-312-410/+406
|
* parser: move Whitespace parser into methodLibravatar Dirkjan Ochtman2023-07-311-144/+142
|
* parser: move impl blocks closer to type definitionsLibravatar Dirkjan Ochtman2023-07-311-12/+12
|
* parser: simplify top-level parser matchLibravatar Dirkjan Ochtman2023-07-311-29/+24
|
* parser: add top-level Ast typeLibravatar Dirkjan Ochtman2023-07-312-115/+148
|
* parser: move nested_parenthesis() helper into node moduleLibravatar Dirkjan Ochtman2023-07-312-51/+49
|
* parser: move helper functions into State implLibravatar Dirkjan Ochtman2023-07-312-93/+92
|
* parser: move trait impl closer to type definitionLibravatar Dirkjan Ochtman2023-07-312-11/+11
|
* parser: move single-use functions into callerLibravatar Dirkjan Ochtman2023-07-311-13/+13
|
* Extract askama_parser crateLibravatar Dirkjan Ochtman2023-07-3112-46/+68
|
* derive: move whitespace conversion into config moduleLibravatar Dirkjan Ochtman2023-07-312-12/+11
|
* derive: move Parsed into parser moduleLibravatar Dirkjan Ochtman2023-07-312-36/+35
|
* derive: move generator-specific methods out of ExprLibravatar Dirkjan Ochtman2023-07-312-73/+71
|
* derive: define separate ParseError typeLibravatar Dirkjan Ochtman2023-07-314-9/+32
|
* derive: move Syntax into parser moduleLibravatar Dirkjan Ochtman2023-07-315-40/+38
|
* Fix Rust macro invocations not accepting a path (#837)Libravatar Matthew Taylor2023-07-245-19/+95
|
* There's no mention of name afterwardsLibravatar Justin Abrahms2023-07-211-1/+1
|
* fix clippy::items-after-test-module error (#839)Libravatar Matthew Taylor2023-07-141-9/+9
|
* Cache include AST to reduce parsing overheadLibravatar Dirkjan Ochtman2023-06-281-23/+16
|
* Inline child() method to avoid borrowing all fieldsLibravatar Dirkjan Ochtman2023-06-281-27/+23
|
* Avoid reparsing included templates if possibleLibravatar Dirkjan Ochtman2023-06-281-4/+23
|
* Parse templates onceLibravatar Dirkjan Ochtman2023-06-283-18/+45
|
* Add section for performance tipsLibravatar wrapperup2023-06-282-0/+17
|
* Added example on how to use super()Libravatar reportingissue2023-06-211-1/+2
|
* Update mendes requirement from 0.2.0 to 0.3.0Libravatar dependabot[bot]2023-06-131-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 argumentsLibravatar mataha2023-06-123-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 lengthLibravatar René Kijewski2023-05-312-18/+96
|
* Update criterion requirement from 0.4 to 0.5Libravatar dependabot[bot]2023-05-242-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.18Libravatar Dirkjan Ochtman2023-05-203-2/+3
|
* Update to rocket 0.5-rc.3Libravatar Vypo Mouse2023-05-193-7/+22
|
* Improve whitespace documentationLibravatar Raimundo Saona2023-04-031-2/+27
|
* Re-export `askama::*` in `askama_tide` (#802)Libravatar René Kijewski2023-04-012-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()`Libravatar René Kijewski2023-03-311-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 documentationLibravatar Jacob Hoffman-Andrews2023-03-311-1/+9
|
* Use lookup tableLibravatar René Kijewski2023-03-301-5/+13
|
* Escape HTML fasterLibravatar René Kijewski2023-03-301-29/+23
| | | | | | | | | | | | | | | | | | | | | Escaped HTML characters vary in length. So, in order to select the correct replacement two variables need to be loaded: The pointer to the new substring and its length. Because of this the generated code is less dense than it could be. With this PR instead of selecting the appropriate `&str`, an `&&str` is selected. The former consumes two words while the latter consumes only one. Intuitively one might assume that the double dereference makes the code slower, but the optimized lookup seems to be so much faster, so that the change is worth its weight. Comparing the result of `cargo bench` (best out of three runs for both): ```text Old: [4.3592 µs 4.3675 µs 4.3764 µs] New: [3.8691 µs 3.8766 µs 3.8860 µs] Diff: [-11.24 % -11.24 % -12.21 % ] ```