Ed Page
d171cdbaf1
refactor(parser): Remove trivial deprecated 'tag' uses
2024-10-25 11:57:07 -05:00
Ed Page
25067bdb4e
refactor(parser): Rely on Parser trait rather than FnMut
2024-10-25 11:56:50 -05:00
Ed Page
a12a667871
refactor(parser): Migrate to Winnow 0.3
2024-10-25 11:56:11 -05:00
René Kijewski
4b44189809
ci: update formatting for edition=2024
2024-09-24 02:07:17 +02:00
René Kijewski
eed37cd415
Run clippy --fix -- -D clippy::pedantic
2024-09-16 22:58:50 +02:00
René Kijewski
bff113a942
parser: allow trailing comma in array expressions
2024-08-24 23:21:12 +02:00
René Kijewski
fa003fcd0d
parser: fix float parsing
2024-08-19 14:35:07 +02:00
Guillaume Gomez
71f49a8fc2
Add support for prefixes for string literals
2024-08-18 22:43:59 +02:00
Guillaume Gomez
1a24ace17b
Add support for b
prefix for char literals
2024-08-18 22:35:03 +02:00
Guillaume Gomez
9873ea065f
Improve compile-time if conditions handling
2024-08-09 20:32:38 +02:00
René Kijewski
e0a7d4df55
parser: use fail fail()
where appropriate
2024-08-07 20:36:31 +02:00
Guillaume Gomez
e74f0d20ba
Change the error message to make it start at the as
keyword
2024-07-28 21:37:22 +02:00
René Kijewski
d413474217
parser: store list of primitive types at one place
2024-07-28 18:02:52 +02:00
René Kijewski
a6a474514e
Implement operator as
in template language
...
Because it is not always super obvious if an identifier refers to `T` or
`&T`, any references are automatically followed.
2024-07-28 18:02:14 +02:00
Guillaume Gomez
eb4ceae2a3
Store bool for BoolLit instead of str
2024-07-26 22:12:55 +02:00
Guillaume Gomez
5c5d9a2fc3
Remove level nesting in is_defined
parsing
2024-07-24 13:14:51 +02:00
Guillaume Gomez
0372dac003
Implement is (not) defined
2024-07-24 10:27:35 +02:00
René Kijewski
10e67fa312
Reimplement {% filter %}
block
...
This PR reimplements the code generation for `{% filter %}` blocks, so
that the data is written directly into its destination writer, without
using a buffer. This way it behaves like a specialized
`{{ expr|filter1|filter2 }}` would, if the `expr` was a `Template` that
contained the body of the filter block.
2024-07-13 11:11:04 +02:00
Guillaume Gomez
e9fc4a6db3
Allow to use *
and &
in expressions
2024-07-01 20:54:13 +02:00
René Kijewski
50ac555684
Remove helper functions
2024-06-23 20:55:00 +02:00
René Kijewski
fb4d8a6073
Better error message for space + filter
2024-06-23 20:54:28 +02:00
René Kijewski
879d889bb2
Use ISO 646 alternative operators for bit ops
...
This change allows simplifying the use of filter expressions, because
you won't have to care about spaces around the `|` pipe operator.
2024-06-23 20:47:27 +02:00
Guillaume Gomez
20c26dbf0f
Limit nested filters to avoid stack overflow
2024-06-20 18:53:14 +02:00
Guillaume Gomez
9f271fe142
Wrap Expr
into WithSpan
2024-06-17 17:18:55 +02:00
Guillaume Gomez
2d80cc3524
Rename everything to rinja
2024-06-17 15:58:52 +02:00