Comments (3)
Appears to be only and
and or
. I'll try to write up a patch.
from minijinja.
I can imagine there being bugs but I am actually not able to reproduce. The following template:
{{ '{{ a }}' == 'a' and ( '{{ a }}' != 'b' or '{{ a }}' != 'c' ) }}
Produces the following AST:
Ok(
Template {
children: [
EmitExpr {
expr: BinOp {
op: ScAnd,
left: BinOp {
op: Eq,
left: Const {
value: "{{ a }}",
} @ 1:3-1:12,
right: Const {
value: "a",
} @ 1:16-1:19,
} @ 1:0-1:19,
right: BinOp {
op: ScOr,
left: BinOp {
op: Ne,
left: Const {
value: "{{ a }}",
} @ 1:26-1:35,
right: Const {
value: "b",
} @ 1:39-1:42,
} @ 1:24-1:42,
right: BinOp {
op: Ne,
left: Const {
value: "{{ a }}",
} @ 1:46-1:55,
right: Const {
value: "c",
} @ 1:59-1:62,
} @ 1:43-1:62,
} @ 1:24-1:62,
} @ 1:0-1:64,
} @ 1:0-1:64,
],
} @ 0:0-1:67,
)
Which seems fine? Can you provide a minimal test case that shows this behavior?
from minijinja.
I'm unable to reproduce this. Jinja never had keywords and syntax wise it should not be necessary to enforce keywords to avoid ambiguities. The obvious exception is that if you name variables after soft keywords they won't function well in all contexts.
from minijinja.
Related Issues (20)
- `{% macro %}` hoisting HOT 1
- `UndefinedBehavior::Chainable` and `containment check` HOT 2
- Support implement `Function` trait manually HOT 3
- Eager evaluate syntax HOT 2
- Autoreload doesn't work by itself HOT 3
- jinja2.meta.find_undeclared_variables equivalent HOT 4
- minijinja-cli HOT 2
- Why don't use String in add_template? HOT 2
- Optimization: allow using the same pre-serialized context for several templates HOT 1
- Feature: Render Block fragment HOT 6
- Introduce TemplateModule Abstraction
- Remove State.current_call
- Expose call() on Value
- MiniJinja 1.0 Plans HOT 1
- Move render_block and consorts onto TemplateModule
- Final 0.x Release with Deprecations HOT 1
- MiniJinja 1.0 Alpha Feedback HOT 4
- String indexing and comparison doesn't seem to work HOT 2
- Investigate Value with Lifetime HOT 1
- Replace Arc<String> with Arc<str>
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minijinja.