Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aceae012fa | ||
|
|
ca01dd5f95 | ||
|
|
06aa8706c8 |
No files matched your search
@@ -72,6 +72,45 @@ Consequences worth knowing before editing a rule:
|
|||||||
part boundary is `SEP` instead of the meaningful token, so LR(1) loses its discriminator. That is why
|
part boundary is `SEP` instead of the meaningful token, so LR(1) loses its discriminator. That is why
|
||||||
`predicate` and `[$.library, $.load]` are listed there.
|
`predicate` and `[$.library, $.load]` are listed there.
|
||||||
|
|
||||||
|
### A tag group is a sequence of clauses
|
||||||
|
|
||||||
|
Every group is split so that each tag that opens a body owns a node of its own:
|
||||||
|
|
||||||
|
```js
|
||||||
|
if_clause: ($) => seq(block("if", part($.predicate)), optional($.template)),
|
||||||
|
if_group: ($) =>
|
||||||
|
seq($.if_clause, repeat($.elif_clause), optional($.else_clause), block("endif")),
|
||||||
|
```
|
||||||
|
|
||||||
|
**A clause is complete without the closing tag, and that is the point.** While a template is being edited
|
||||||
|
the closer usually is not there yet, and a group rule cannot be reduced without it — so `{% if a %}{% x %}`
|
||||||
|
used to produce a top-level `ERROR` with the body's `template` parented to nothing that says which tag
|
||||||
|
opened it. A clause reduces anyway, so it survives error recovery and tooling can walk up from the cursor
|
||||||
|
to find the enclosing tag. That is what makes completion of `{% elif %}`, `{% else %}`, `{% empty %}` and
|
||||||
|
the end tags possible.
|
||||||
|
|
||||||
|
The names themselves need no hand-maintained list either: in the generated `src/node-types.json`, a group's
|
||||||
|
`children` are its clause types and its own `tag:` field holds the end tag, so the candidates for a group
|
||||||
|
are its `tag:` plus the `tag:` of each clause it can hold. For `if_group` that is `endif` from the group and
|
||||||
|
`if`, `elif`, `else` from its three clauses. Going the other way — from a clause the cursor sits in to the
|
||||||
|
groups that can hold it — is the same table read backwards, which is what an unterminated tag needs, since
|
||||||
|
the group node does not exist yet.
|
||||||
|
|
||||||
|
Do not reach for lookahead to solve that instead: `ts_language_next_state` follows only the shift on `{%`,
|
||||||
|
which lands in the "a tag starts here" state no matter how the tree is shaped.
|
||||||
|
|
||||||
|
`else_clause` is shared by `if_group` and `ifchanged_group`. `comment_group` and `verbatim_group` have no
|
||||||
|
clause — their bodies are raw scanner text that admits no tags — and neither does `blocktranslate_group`,
|
||||||
|
whose body is `_translate_body`.
|
||||||
|
|
||||||
|
**Every clause needs a `conflicts` entry.** The generator offers a left associativity instead; taking it is
|
||||||
|
what broke `{% for %}` in `06aa870`, where `prec.left` resolved the shift/reduce on `{%` statically and
|
||||||
|
silently discarded the parse in which the body continues, so every tag inside a loop became an `ERROR`.
|
||||||
|
|
||||||
|
Sharing the clauses also made the table markedly smaller — 7,200 states and a 515KB library became 5,150
|
||||||
|
and 383KB — for the same reason hoisting `blocktranslate`'s pieces into hidden rules did: the automaton
|
||||||
|
stops duplicating the body states in every group's inline context.
|
||||||
|
|
||||||
### Filter pipes differ by context
|
### Filter pipes differ by context
|
||||||
|
|
||||||
Django parses everything between `{{` and `}}` — and the entire remainder of `{% filter %}` — as one
|
Django parses everything between `{{` and `}}` — and the entire remainder of `{% filter %}` — as one
|
||||||
@@ -183,7 +222,11 @@ captured through its field instead (`(filter name: (identifier))`, `(custom_tag
|
|||||||
|
|
||||||
`queries/libraries.scm` is not a query editors run themselves; it is data for a linter, and every tag or
|
`queries/libraries.scm` is not a query editors run themselves; it is data for a linter, and every tag or
|
||||||
filter added from a library belongs in it. `queries/locals.scm` relies on the `variable:` field to tell a
|
filter added from a library belongs in it. `queries/locals.scm` relies on the `variable:` field to tell a
|
||||||
binding from a reference — another reason to keep `asVariable` uniform.
|
binding from a reference — another reason to keep `asVariable` uniform. `{% blocktranslate %}`'s `asvar`
|
||||||
|
target carries an `asvar:` field instead, because it is written inside the tag but assigned outside it:
|
||||||
|
the scope on `blocktranslate_group` confines the `with` and `count` bindings, and would swallow `asvar`
|
||||||
|
too if it were spelled the same way. Defining it in the surrounding scope is left to the tool, since a
|
||||||
|
locals query cannot let a definition out of the scope that contains it.
|
||||||
|
|
||||||
## Testing
|
## Testing
|
||||||
|
|
||||||
@@ -242,6 +285,10 @@ documentation or memory. Both checks are worth repeating whenever tags, filters
|
|||||||
`{% cache 500 sidebar.name %}` names a fragment there, `{% cache 500 using="c" %}` names a fragment
|
`{% cache 500 sidebar.name %}` names a fragment there, `{% cache 500 using="c" %}` names a fragment
|
||||||
called `using="c"` rather than choosing a cache, and `{% cache 500 sidebar using= %}` takes an empty
|
called `using="c"` rather than choosing a cache, and `{% cache 500 sidebar using= %}` takes an empty
|
||||||
name. All three are errors here.
|
name. All three are errors here.
|
||||||
|
- `do_for` reads `reversed` off the end of the tag before it looks for `in`, so `{% for x in reversed %}`
|
||||||
|
is an error there and a loop over a variable named `reversed` here. Writing the flag as well
|
||||||
|
(`{% for x in reversed reversed %}`) is accepted by both, which is why the name is not simply reserved
|
||||||
|
in that position.
|
||||||
- `do_translate` refuses `as` and `noop` as the value of its `context` option, so
|
- `do_translate` refuses `as` and `noop` as the value of its `context` option, so
|
||||||
`{% trans "hi" context noop %}` is an error there and a context named by the variable `noop` here.
|
`{% trans "hi" context noop %}` is an error there and a context named by the variable `noop` here.
|
||||||
- `partial`/`partialdef` are Django builtins as of Django 6; `elif`/`else`/`empty` are modelled as parts of
|
- `partial`/`partialdef` are Django builtins as of Django 6; `elif`/`else`/`empty` are modelled as parts of
|
||||||
|
|||||||
+82
-74
@@ -291,6 +291,23 @@ const django = grammar({
|
|||||||
// after it settles
|
// after it settles
|
||||||
conflicts: ($) => [
|
conflicts: ($) => [
|
||||||
[$.template],
|
[$.template],
|
||||||
|
[$.autoescape_clause],
|
||||||
|
[$.block_clause],
|
||||||
|
[$.cache_clause],
|
||||||
|
[$.elif_clause],
|
||||||
|
[$.else_clause],
|
||||||
|
[$.empty_clause],
|
||||||
|
[$.filter_clause],
|
||||||
|
[$.for_clause],
|
||||||
|
[$.if_clause],
|
||||||
|
[$.ifchanged_clause],
|
||||||
|
[$.language_clause],
|
||||||
|
[$.localize_clause],
|
||||||
|
[$.localtime_clause],
|
||||||
|
[$.partialdef_clause],
|
||||||
|
[$.spaceless_clause],
|
||||||
|
[$.timezone_clause],
|
||||||
|
[$.with_clause],
|
||||||
[$.predicate],
|
[$.predicate],
|
||||||
[$.library, $.load],
|
[$.library, $.load],
|
||||||
[$._translate_option],
|
[$._translate_option],
|
||||||
@@ -481,19 +498,13 @@ const django = grammar({
|
|||||||
optional(seq(":", field("argument", $.value))),
|
optional(seq(":", field("argument", $.value))),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
autoescape_group: ($) =>
|
autoescape_clause: ($) =>
|
||||||
seq(
|
seq(block("autoescape", part(choice("on", "off"))), optional($.template)),
|
||||||
block("autoescape", part(choice("on", "off"))),
|
autoescape_group: ($) => seq($.autoescape_clause, block("endautoescape")),
|
||||||
optional($.template),
|
|
||||||
block("endautoescape"),
|
|
||||||
),
|
|
||||||
// the scanner takes the whitespace before a name it has to match itself
|
// the scanner takes the whitespace before a name it has to match itself
|
||||||
block_group: ($) =>
|
block_clause: ($) =>
|
||||||
seq(
|
seq(block("block", field("name", $.push_block)), optional($.template)),
|
||||||
block("block", field("name", $.push_block)),
|
block_group: ($) => seq($.block_clause, block("endblock", $.pop_block)),
|
||||||
optional($.template),
|
|
||||||
block("endblock", $.pop_block),
|
|
||||||
),
|
|
||||||
blocktranslate_group: ($) =>
|
blocktranslate_group: ($) =>
|
||||||
choice(
|
choice(
|
||||||
...["blocktrans", "blocktranslate"].map((name) =>
|
...["blocktrans", "blocktranslate"].map((name) =>
|
||||||
@@ -531,7 +542,10 @@ const django = grammar({
|
|||||||
seq(part("with"), $._tag_kwargs),
|
seq(part("with"), $._tag_kwargs),
|
||||||
part("context", $.filtered_value),
|
part("context", $.filtered_value),
|
||||||
part("trimmed"),
|
part("trimmed"),
|
||||||
part("asvar", field("variable", $.identifier)),
|
// asvar names where the rendered text is stored, which is read
|
||||||
|
// after the block rather than inside it, so it is not a binding of
|
||||||
|
// the block the way "with" and "count" are
|
||||||
|
part("asvar", field("asvar", $.identifier)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
_translate_count: ($) =>
|
_translate_count: ($) =>
|
||||||
@@ -560,7 +574,7 @@ const django = grammar({
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
cache_group: ($) =>
|
cache_clause: ($) =>
|
||||||
seq(
|
seq(
|
||||||
block(
|
block(
|
||||||
"cache",
|
"cache",
|
||||||
@@ -570,8 +584,8 @@ const django = grammar({
|
|||||||
optional(part(seq("using=", $.filtered_value))),
|
optional(part(seq("using=", $.filtered_value))),
|
||||||
),
|
),
|
||||||
optional($.template),
|
optional($.template),
|
||||||
block("endcache"),
|
|
||||||
),
|
),
|
||||||
|
cache_group: ($) => seq($.cache_clause, block("endcache")),
|
||||||
comment_group: ($) =>
|
comment_group: ($) =>
|
||||||
seq(
|
seq(
|
||||||
block("comment", optional(part($.string))),
|
block("comment", optional(part($.string))),
|
||||||
@@ -602,7 +616,7 @@ const django = grammar({
|
|||||||
),
|
),
|
||||||
debug: ($) => block("debug"),
|
debug: ($) => block("debug"),
|
||||||
extends: ($) => block("extends", part($.filtered_value)),
|
extends: ($) => block("extends", part($.filtered_value)),
|
||||||
filter_group: ($) =>
|
filter_clause: ($) =>
|
||||||
seq(
|
seq(
|
||||||
// the filter tag hands Django the rest of its text as one expression
|
// the filter tag hands Django the rest of its text as one expression
|
||||||
// rather than as split arguments, so pipes here take whitespace just
|
// rather than as split arguments, so pipes here take whitespace just
|
||||||
@@ -612,40 +626,38 @@ const django = grammar({
|
|||||||
part(alias($._filter_expression_spaced, $.filter_expression)),
|
part(alias($._filter_expression_spaced, $.filter_expression)),
|
||||||
),
|
),
|
||||||
optional($.template),
|
optional($.template),
|
||||||
block("endfilter"),
|
|
||||||
),
|
),
|
||||||
|
filter_group: ($) => seq($.filter_clause, block("endfilter")),
|
||||||
firstof: ($) =>
|
firstof: ($) =>
|
||||||
block(
|
block(
|
||||||
"firstof",
|
"firstof",
|
||||||
repeat1(part($.filtered_value)),
|
repeat1(part($.filtered_value)),
|
||||||
optional(asVariable($)),
|
optional(asVariable($)),
|
||||||
),
|
),
|
||||||
for_scope: ($) =>
|
for_clause: ($) =>
|
||||||
prec.left(
|
|
||||||
seq(
|
|
||||||
block(
|
|
||||||
"for",
|
|
||||||
part(field("variable", $.identifier)),
|
|
||||||
repeat(
|
|
||||||
seq(
|
|
||||||
optional(SEP),
|
|
||||||
",",
|
|
||||||
optional(SEP),
|
|
||||||
field("variable", $.identifier),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
part("in"),
|
|
||||||
part($.filtered_value),
|
|
||||||
),
|
|
||||||
optional($.template),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
for_group: ($) =>
|
|
||||||
seq(
|
seq(
|
||||||
$.for_scope,
|
block(
|
||||||
optional(seq(block("empty"), optional($.template))),
|
"for",
|
||||||
block("endfor"),
|
part(field("variable", $.identifier)),
|
||||||
|
repeat(
|
||||||
|
seq(
|
||||||
|
optional(SEP),
|
||||||
|
",",
|
||||||
|
optional(SEP),
|
||||||
|
field("variable", $.identifier),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
part("in"),
|
||||||
|
part($.filtered_value),
|
||||||
|
// do_for reads this off the end and takes the sequence from the bit
|
||||||
|
// before it, so it comes last or not at all
|
||||||
|
optional(part("reversed")),
|
||||||
|
),
|
||||||
|
optional($.template),
|
||||||
),
|
),
|
||||||
|
empty_clause: ($) => seq(block("empty"), optional($.template)),
|
||||||
|
for_group: ($) =>
|
||||||
|
seq($.for_clause, optional($.empty_clause), block("endfor")),
|
||||||
/**
|
/**
|
||||||
* django.templatetags.i18n. Each of these requires exactly "as <name>",
|
* django.templatetags.i18n. Each of these requires exactly "as <name>",
|
||||||
* or "for <expression> as <name>", and rejects anything further.
|
* or "for <expression> as <name>", and rejects anything further.
|
||||||
@@ -672,21 +684,25 @@ const django = grammar({
|
|||||||
get_media_prefix: ($) => block("get_media_prefix", optional(asVariable($))),
|
get_media_prefix: ($) => block("get_media_prefix", optional(asVariable($))),
|
||||||
get_static_prefix: ($) =>
|
get_static_prefix: ($) =>
|
||||||
block("get_static_prefix", optional(asVariable($))),
|
block("get_static_prefix", optional(asVariable($))),
|
||||||
|
if_clause: ($) => seq(block("if", part($.predicate)), optional($.template)),
|
||||||
|
elif_clause: ($) =>
|
||||||
|
seq(block("elif", part($.predicate)), optional($.template)),
|
||||||
|
/** Shared by if_group and ifchanged_group, which spell it the same way. */
|
||||||
|
else_clause: ($) => seq(block("else"), optional($.template)),
|
||||||
if_group: ($) =>
|
if_group: ($) =>
|
||||||
seq(
|
seq(
|
||||||
block("if", part($.predicate)),
|
$.if_clause,
|
||||||
optional($.template),
|
repeat($.elif_clause),
|
||||||
repeat(seq(block("elif", part($.predicate)), optional($.template))),
|
optional($.else_clause),
|
||||||
optional(seq(block("else"), optional($.template))),
|
|
||||||
block("endif"),
|
block("endif"),
|
||||||
),
|
),
|
||||||
ifchanged_group: ($) =>
|
ifchanged_clause: ($) =>
|
||||||
seq(
|
seq(
|
||||||
block("ifchanged", repeat(part($.filtered_value))),
|
block("ifchanged", repeat(part($.filtered_value))),
|
||||||
optional($.template),
|
optional($.template),
|
||||||
optional(seq(block("else"), optional($.template))),
|
|
||||||
block("endifchanged"),
|
|
||||||
),
|
),
|
||||||
|
ifchanged_group: ($) =>
|
||||||
|
seq($.ifchanged_clause, optional($.else_clause), block("endifchanged")),
|
||||||
/**
|
/**
|
||||||
* do_include takes "with" and "only" in either order and refuses one it has
|
* do_include takes "with" and "only" in either order and refuses one it has
|
||||||
* already been given, and "with" needs at least one argument. It calls
|
* already been given, and "with" needs at least one argument. It calls
|
||||||
@@ -703,12 +719,9 @@ const django = grammar({
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
/** django.templatetags.i18n. The language tag takes the one argument. */
|
/** django.templatetags.i18n. The language tag takes the one argument. */
|
||||||
language_group: ($) =>
|
language_clause: ($) =>
|
||||||
seq(
|
seq(block("language", part($.filtered_value)), optional($.template)),
|
||||||
block("language", part($.filtered_value)),
|
language_group: ($) => seq($.language_clause, block("endlanguage")),
|
||||||
optional($.template),
|
|
||||||
block("endlanguage"),
|
|
||||||
),
|
|
||||||
library: ($) => seq($.identifier, optional(seq(".", $.identifier))),
|
library: ($) => seq($.identifier, optional(seq(".", $.identifier))),
|
||||||
load: ($) =>
|
load: ($) =>
|
||||||
block(
|
block(
|
||||||
@@ -722,19 +735,19 @@ const django = grammar({
|
|||||||
* django.templatetags.l10n. The argument is optional and localize_tag
|
* django.templatetags.l10n. The argument is optional and localize_tag
|
||||||
* rejects anything but "on" or "off", including a second word.
|
* rejects anything but "on" or "off", including a second word.
|
||||||
*/
|
*/
|
||||||
localize_group: ($) =>
|
localize_clause: ($) =>
|
||||||
seq(
|
seq(
|
||||||
block("localize", optional(part(choice("on", "off")))),
|
block("localize", optional(part(choice("on", "off")))),
|
||||||
optional($.template),
|
optional($.template),
|
||||||
block("endlocalize"),
|
|
||||||
),
|
),
|
||||||
|
localize_group: ($) => seq($.localize_clause, block("endlocalize")),
|
||||||
/** django.templatetags.tz, taking "on" or "off" as localize does. */
|
/** django.templatetags.tz, taking "on" or "off" as localize does. */
|
||||||
localtime_group: ($) =>
|
localtime_clause: ($) =>
|
||||||
seq(
|
seq(
|
||||||
block("localtime", optional(part(choice("on", "off")))),
|
block("localtime", optional(part(choice("on", "off")))),
|
||||||
optional($.template),
|
optional($.template),
|
||||||
block("endlocaltime"),
|
|
||||||
),
|
),
|
||||||
|
localtime_group: ($) => seq($.localtime_clause, block("endlocaltime")),
|
||||||
lorem: ($) =>
|
lorem: ($) =>
|
||||||
block(
|
block(
|
||||||
"lorem",
|
"lorem",
|
||||||
@@ -744,12 +757,13 @@ const django = grammar({
|
|||||||
),
|
),
|
||||||
now: ($) => block("now", part($.string), optional(asVariable($))),
|
now: ($) => block("now", part($.string), optional(asVariable($))),
|
||||||
partial: ($) => block("partial", part($.identifier)),
|
partial: ($) => block("partial", part($.identifier)),
|
||||||
partialdef_group: ($) =>
|
partialdef_clause: ($) =>
|
||||||
seq(
|
seq(
|
||||||
block("partialdef", $.push_partial, optional(part("inline"))),
|
block("partialdef", $.push_partial, optional(part("inline"))),
|
||||||
optional($.template),
|
optional($.template),
|
||||||
block("endpartialdef", $.pop_partial),
|
|
||||||
),
|
),
|
||||||
|
partialdef_group: ($) =>
|
||||||
|
seq($.partialdef_clause, block("endpartialdef", $.pop_partial)),
|
||||||
// querystring(context, *args, **kwargs)
|
// querystring(context, *args, **kwargs)
|
||||||
query_string: ($) => simpleTag($, "querystring"),
|
query_string: ($) => simpleTag($, "querystring"),
|
||||||
regroup: ($) =>
|
regroup: ($) =>
|
||||||
@@ -761,8 +775,8 @@ const django = grammar({
|
|||||||
optional(asVariable($)),
|
optional(asVariable($)),
|
||||||
),
|
),
|
||||||
reset_cycle: ($) => block("resetcycle", optional(part($.identifier))),
|
reset_cycle: ($) => block("resetcycle", optional(part($.identifier))),
|
||||||
spaceless_group: ($) =>
|
spaceless_clause: ($) => seq(block("spaceless"), optional($.template)),
|
||||||
seq(block("spaceless"), optional($.template), block("endspaceless")),
|
spaceless_group: ($) => seq($.spaceless_clause, block("endspaceless")),
|
||||||
static: ($) =>
|
static: ($) =>
|
||||||
block("static", part($.filtered_value), optional(asVariable($))),
|
block("static", part($.filtered_value), optional(asVariable($))),
|
||||||
template_tag_block: ($) =>
|
template_tag_block: ($) =>
|
||||||
@@ -782,12 +796,9 @@ const django = grammar({
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
/** django.templatetags.tz. timezone_tag takes the one argument. */
|
/** django.templatetags.tz. timezone_tag takes the one argument. */
|
||||||
timezone_group: ($) =>
|
timezone_clause: ($) =>
|
||||||
seq(
|
seq(block("timezone", part($.filtered_value)), optional($.template)),
|
||||||
block("timezone", part($.filtered_value)),
|
timezone_group: ($) => seq($.timezone_clause, block("endtimezone")),
|
||||||
optional($.template),
|
|
||||||
block("endtimezone"),
|
|
||||||
),
|
|
||||||
/**
|
/**
|
||||||
* django.templatetags.i18n, registered under both spellings. do_translate
|
* django.templatetags.i18n, registered under both spellings. do_translate
|
||||||
* pops its options off one at a time and refuses one it has already seen,
|
* pops its options off one at a time and refuses one it has already seen,
|
||||||
@@ -831,12 +842,9 @@ const django = grammar({
|
|||||||
part($.filtered_value),
|
part($.filtered_value),
|
||||||
optional(asVariable($)),
|
optional(asVariable($)),
|
||||||
),
|
),
|
||||||
with_group: ($) =>
|
with_clause: ($) =>
|
||||||
seq(
|
seq(block("with", $._tag_open, $._tag_kwargs), optional($.template)),
|
||||||
block("with", $._tag_open, $._tag_kwargs),
|
with_group: ($) => seq($.with_clause, block("endwith")),
|
||||||
optional($.template),
|
|
||||||
block("endwith"),
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
variable: (identifier) @variable.parameter
|
variable: (identifier) @variable.parameter
|
||||||
|
|
||||||
|
|
||||||
(block_group
|
(block_clause
|
||||||
(push_block) @type)
|
(push_block) @type)
|
||||||
|
|
||||||
(partialdef_group
|
(partialdef_clause
|
||||||
(push_partial) @type)
|
(push_partial) @type)
|
||||||
|
|
||||||
(verbatim_group
|
(verbatim_group
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
("trans")
|
("trans")
|
||||||
("translate")] @library.i18n)
|
("translate")] @library.i18n)
|
||||||
|
|
||||||
(language_group
|
(language_clause
|
||||||
tag: ("language") @library.i18n)
|
tag: ("language") @library.i18n)
|
||||||
|
|
||||||
(get_available_languages
|
(get_available_languages
|
||||||
@@ -59,10 +59,10 @@
|
|||||||
("language_name_local")
|
("language_name_local")
|
||||||
("language_name_translated")] @library.i18n)
|
("language_name_translated")] @library.i18n)
|
||||||
|
|
||||||
(cache_group
|
(cache_clause
|
||||||
tag: ("cache") @library.cache)
|
tag: ("cache") @library.cache)
|
||||||
|
|
||||||
(localize_group
|
(localize_clause
|
||||||
tag: ("localize") @library.l10n)
|
tag: ("localize") @library.l10n)
|
||||||
|
|
||||||
(filter
|
(filter
|
||||||
@@ -70,10 +70,10 @@
|
|||||||
("localize")
|
("localize")
|
||||||
("unlocalize")] @library.l10n)
|
("unlocalize")] @library.l10n)
|
||||||
|
|
||||||
(localtime_group
|
(localtime_clause
|
||||||
tag: ("localtime") @library.tz)
|
tag: ("localtime") @library.tz)
|
||||||
|
|
||||||
(timezone_group
|
(timezone_clause
|
||||||
tag: ("timezone") @library.tz)
|
tag: ("timezone") @library.tz)
|
||||||
|
|
||||||
(get_current_timezone
|
(get_current_timezone
|
||||||
|
|||||||
+14
-2
@@ -3,5 +3,17 @@
|
|||||||
|
|
||||||
variable: (identifier) @local.definition
|
variable: (identifier) @local.definition
|
||||||
|
|
||||||
(with_group) @local.scope
|
; The tags whose Node pushes a context, so that what they bind is not visible
|
||||||
(for_scope) @local.scope
|
; after them. Verified by rendering: "{% block b %}{% now "Y" as n %}{% endblock %}{{ n }}"
|
||||||
|
; is empty, while the same around an "{% if %}" is not, because if does not push.
|
||||||
|
(with_clause) @local.scope
|
||||||
|
(for_clause) @local.scope
|
||||||
|
(block_clause) @local.scope
|
||||||
|
(partialdef_clause) @local.scope
|
||||||
|
|
||||||
|
; blocktranslate pushes a context for its "with" and "count" bindings. Its
|
||||||
|
; asvar target is not one of them: it is written in the same tag but assigned
|
||||||
|
; outside it, and carries an "asvar" field rather than "variable" so that this
|
||||||
|
; scope does not swallow it. A tool that wants it must define it in the scope
|
||||||
|
; around the block, which a locals query has no way to say.
|
||||||
|
(blocktranslate_group) @local.scope
|
||||||
+7
-5
@@ -1,15 +1,17 @@
|
|||||||
(load
|
(load
|
||||||
(identifier) @name) @definition.function
|
(identifier) @name) @definition.function
|
||||||
|
|
||||||
(partialdef_group (push_partial) @name) @definition.method
|
(partialdef_clause (push_partial) @name) @definition.method
|
||||||
(partial (identifier) @name) @reference.call
|
(partial (identifier) @name) @reference.call
|
||||||
|
|
||||||
|
; every tag that opens a group names itself in a clause of its own, and every
|
||||||
|
; tag that does not is a group member directly
|
||||||
(template_block_groups
|
(template_block_groups
|
||||||
[
|
[
|
||||||
(_
|
(_
|
||||||
tag: _ @name) @reference.call
|
tag: _ @name)
|
||||||
(for_group
|
(_
|
||||||
(for_scope
|
(_
|
||||||
tag: "for" @reference.call))])
|
tag: _ @name))] @reference.call)
|
||||||
|
|
||||||
(filter) @reference.call
|
(filter) @reference.call
|
||||||
+534
-395
File diff suppressed because it is too large.
Load diff
+507
-129
@@ -204,20 +204,16 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "autoescape_group",
|
"type": "autoescape_clause",
|
||||||
"named": true,
|
"named": true,
|
||||||
"fields": {
|
"fields": {
|
||||||
"tag": {
|
"tag": {
|
||||||
"multiple": true,
|
"multiple": false,
|
||||||
"required": true,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
{
|
||||||
"type": "autoescape",
|
"type": "autoescape",
|
||||||
"named": false
|
"named": false
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "endautoescape",
|
|
||||||
"named": false
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -233,13 +229,39 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "autoescape_group",
|
||||||
|
"named": true,
|
||||||
|
"fields": {
|
||||||
|
"tag": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "endautoescape",
|
||||||
|
"named": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"children": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "autoescape_clause",
|
||||||
|
"named": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "binaryOperator",
|
"type": "binaryOperator",
|
||||||
"named": true,
|
"named": true,
|
||||||
"fields": {}
|
"fields": {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "block_group",
|
"type": "block_clause",
|
||||||
"named": true,
|
"named": true,
|
||||||
"fields": {
|
"fields": {
|
||||||
"name": {
|
"name": {
|
||||||
@@ -253,13 +275,35 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"tag": {
|
"tag": {
|
||||||
"multiple": true,
|
"multiple": false,
|
||||||
"required": true,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
{
|
||||||
"type": "block",
|
"type": "block",
|
||||||
"named": false
|
"named": false
|
||||||
},
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"children": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": false,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "template",
|
||||||
|
"named": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "block_group",
|
||||||
|
"named": true,
|
||||||
|
"fields": {
|
||||||
|
"tag": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
{
|
{
|
||||||
"type": "endblock",
|
"type": "endblock",
|
||||||
"named": false
|
"named": false
|
||||||
@@ -272,11 +316,11 @@
|
|||||||
"required": true,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
{
|
||||||
"type": "pop_block",
|
"type": "block_clause",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "template",
|
"type": "pop_block",
|
||||||
"named": true
|
"named": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -286,6 +330,16 @@
|
|||||||
"type": "blocktranslate_group",
|
"type": "blocktranslate_group",
|
||||||
"named": true,
|
"named": true,
|
||||||
"fields": {
|
"fields": {
|
||||||
|
"asvar": {
|
||||||
|
"multiple": true,
|
||||||
|
"required": false,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "identifier",
|
||||||
|
"named": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"tag": {
|
"tag": {
|
||||||
"multiple": true,
|
"multiple": true,
|
||||||
"required": true,
|
"required": true,
|
||||||
@@ -343,20 +397,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "cache_group",
|
"type": "cache_clause",
|
||||||
"named": true,
|
"named": true,
|
||||||
"fields": {
|
"fields": {
|
||||||
"tag": {
|
"tag": {
|
||||||
"multiple": true,
|
"multiple": false,
|
||||||
"required": true,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
{
|
||||||
"type": "cache",
|
"type": "cache",
|
||||||
"named": false
|
"named": false
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "endcache",
|
|
||||||
"named": false
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -384,6 +434,32 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "cache_group",
|
||||||
|
"named": true,
|
||||||
|
"fields": {
|
||||||
|
"tag": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "endcache",
|
||||||
|
"named": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"children": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "cache_clause",
|
||||||
|
"named": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "comment_group",
|
"type": "comment_group",
|
||||||
"named": true,
|
"named": true,
|
||||||
@@ -562,6 +638,88 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "elif_clause",
|
||||||
|
"named": true,
|
||||||
|
"fields": {
|
||||||
|
"tag": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "elif",
|
||||||
|
"named": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"children": {
|
||||||
|
"multiple": true,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "predicate",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "template",
|
||||||
|
"named": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "else_clause",
|
||||||
|
"named": true,
|
||||||
|
"fields": {
|
||||||
|
"tag": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "else",
|
||||||
|
"named": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"children": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": false,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "template",
|
||||||
|
"named": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "empty_clause",
|
||||||
|
"named": true,
|
||||||
|
"fields": {
|
||||||
|
"tag": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "empty",
|
||||||
|
"named": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"children": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": false,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "template",
|
||||||
|
"named": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "extends",
|
"type": "extends",
|
||||||
"named": true,
|
"named": true,
|
||||||
@@ -878,6 +1036,36 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "filter_clause",
|
||||||
|
"named": true,
|
||||||
|
"fields": {
|
||||||
|
"tag": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "filter",
|
||||||
|
"named": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"children": {
|
||||||
|
"multiple": true,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "filter_expression",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "template",
|
||||||
|
"named": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "filter_expression",
|
"type": "filter_expression",
|
||||||
"named": true,
|
"named": true,
|
||||||
@@ -898,30 +1086,22 @@
|
|||||||
"named": true,
|
"named": true,
|
||||||
"fields": {
|
"fields": {
|
||||||
"tag": {
|
"tag": {
|
||||||
"multiple": true,
|
"multiple": false,
|
||||||
"required": true,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
{
|
||||||
"type": "endfilter",
|
"type": "endfilter",
|
||||||
"named": false
|
"named": false
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "filter",
|
|
||||||
"named": false
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"children": {
|
"children": {
|
||||||
"multiple": true,
|
"multiple": false,
|
||||||
"required": true,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
{
|
||||||
"type": "filter_expression",
|
"type": "filter_clause",
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "template",
|
|
||||||
"named": true
|
"named": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -983,41 +1163,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "for_group",
|
"type": "for_clause",
|
||||||
"named": true,
|
|
||||||
"fields": {
|
|
||||||
"tag": {
|
|
||||||
"multiple": true,
|
|
||||||
"required": true,
|
|
||||||
"types": [
|
|
||||||
{
|
|
||||||
"type": "empty",
|
|
||||||
"named": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "endfor",
|
|
||||||
"named": false
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"children": {
|
|
||||||
"multiple": true,
|
|
||||||
"required": true,
|
|
||||||
"types": [
|
|
||||||
{
|
|
||||||
"type": "for_scope",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "template",
|
|
||||||
"named": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "for_scope",
|
|
||||||
"named": true,
|
"named": true,
|
||||||
"fields": {
|
"fields": {
|
||||||
"tag": {
|
"tag": {
|
||||||
@@ -1056,6 +1202,36 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "for_group",
|
||||||
|
"named": true,
|
||||||
|
"fields": {
|
||||||
|
"tag": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "endfor",
|
||||||
|
"named": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"children": {
|
||||||
|
"multiple": true,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "empty_clause",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "for_clause",
|
||||||
|
"named": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "get_available_languages",
|
"type": "get_available_languages",
|
||||||
"named": true,
|
"named": true,
|
||||||
@@ -1285,25 +1461,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "if_group",
|
"type": "if_clause",
|
||||||
"named": true,
|
"named": true,
|
||||||
"fields": {
|
"fields": {
|
||||||
"tag": {
|
"tag": {
|
||||||
"multiple": true,
|
"multiple": false,
|
||||||
"required": true,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
|
||||||
"type": "elif",
|
|
||||||
"named": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "else",
|
|
||||||
"named": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "endif",
|
|
||||||
"named": false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "if",
|
"type": "if",
|
||||||
"named": false
|
"named": false
|
||||||
@@ -1327,21 +1491,47 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "ifchanged_group",
|
"type": "if_group",
|
||||||
"named": true,
|
"named": true,
|
||||||
"fields": {
|
"fields": {
|
||||||
"tag": {
|
"tag": {
|
||||||
"multiple": true,
|
"multiple": false,
|
||||||
"required": true,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
{
|
||||||
"type": "else",
|
"type": "endif",
|
||||||
"named": false
|
"named": false
|
||||||
},
|
}
|
||||||
{
|
]
|
||||||
"type": "endifchanged",
|
}
|
||||||
"named": false
|
},
|
||||||
},
|
"children": {
|
||||||
|
"multiple": true,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "elif_clause",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "else_clause",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "if_clause",
|
||||||
|
"named": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ifchanged_clause",
|
||||||
|
"named": true,
|
||||||
|
"fields": {
|
||||||
|
"tag": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
{
|
{
|
||||||
"type": "ifchanged",
|
"type": "ifchanged",
|
||||||
"named": false
|
"named": false
|
||||||
@@ -1364,6 +1554,36 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "ifchanged_group",
|
||||||
|
"named": true,
|
||||||
|
"fields": {
|
||||||
|
"tag": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "endifchanged",
|
||||||
|
"named": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"children": {
|
||||||
|
"multiple": true,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "else_clause",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ifchanged_clause",
|
||||||
|
"named": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "include",
|
"type": "include",
|
||||||
"named": true,
|
"named": true,
|
||||||
@@ -1401,17 +1621,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "language_group",
|
"type": "language_clause",
|
||||||
"named": true,
|
"named": true,
|
||||||
"fields": {
|
"fields": {
|
||||||
"tag": {
|
"tag": {
|
||||||
"multiple": true,
|
"multiple": false,
|
||||||
"required": true,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
|
||||||
"type": "endlanguage",
|
|
||||||
"named": false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "language",
|
"type": "language",
|
||||||
"named": false
|
"named": false
|
||||||
@@ -1434,6 +1650,32 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "language_group",
|
||||||
|
"named": true,
|
||||||
|
"fields": {
|
||||||
|
"tag": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "endlanguage",
|
||||||
|
"named": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"children": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "language_clause",
|
||||||
|
"named": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"named": true,
|
"named": true,
|
||||||
@@ -1502,20 +1744,68 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "localize_clause",
|
||||||
|
"named": true,
|
||||||
|
"fields": {
|
||||||
|
"tag": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "localize",
|
||||||
|
"named": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"children": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": false,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "template",
|
||||||
|
"named": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "localize_group",
|
"type": "localize_group",
|
||||||
"named": true,
|
"named": true,
|
||||||
"fields": {
|
"fields": {
|
||||||
"tag": {
|
"tag": {
|
||||||
"multiple": true,
|
"multiple": false,
|
||||||
"required": true,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
{
|
||||||
"type": "endlocalize",
|
"type": "endlocalize",
|
||||||
"named": false
|
"named": false
|
||||||
},
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"children": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "localize_clause",
|
||||||
|
"named": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "localtime_clause",
|
||||||
|
"named": true,
|
||||||
|
"fields": {
|
||||||
|
"tag": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
{
|
{
|
||||||
"type": "localize",
|
"type": "localtime",
|
||||||
"named": false
|
"named": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -1537,26 +1827,22 @@
|
|||||||
"named": true,
|
"named": true,
|
||||||
"fields": {
|
"fields": {
|
||||||
"tag": {
|
"tag": {
|
||||||
"multiple": true,
|
"multiple": false,
|
||||||
"required": true,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
{
|
||||||
"type": "endlocaltime",
|
"type": "endlocaltime",
|
||||||
"named": false
|
"named": false
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "localtime",
|
|
||||||
"named": false
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"children": {
|
"children": {
|
||||||
"multiple": false,
|
"multiple": false,
|
||||||
"required": false,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
{
|
||||||
"type": "template",
|
"type": "localtime_clause",
|
||||||
"named": true
|
"named": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -1651,17 +1937,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "partialdef_group",
|
"type": "partialdef_clause",
|
||||||
"named": true,
|
"named": true,
|
||||||
"fields": {
|
"fields": {
|
||||||
"tag": {
|
"tag": {
|
||||||
"multiple": true,
|
"multiple": false,
|
||||||
"required": true,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
|
||||||
"type": "endpartialdef",
|
|
||||||
"named": false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "partialdef",
|
"type": "partialdef",
|
||||||
"named": false
|
"named": false
|
||||||
@@ -1673,10 +1955,6 @@
|
|||||||
"multiple": true,
|
"multiple": true,
|
||||||
"required": true,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
|
||||||
"type": "pop_partial",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "push_partial",
|
"type": "push_partial",
|
||||||
"named": true
|
"named": true
|
||||||
@@ -1688,6 +1966,36 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "partialdef_group",
|
||||||
|
"named": true,
|
||||||
|
"fields": {
|
||||||
|
"tag": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "endpartialdef",
|
||||||
|
"named": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"children": {
|
||||||
|
"multiple": true,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "partialdef_clause",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "pop_partial",
|
||||||
|
"named": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "predicate",
|
"type": "predicate",
|
||||||
"named": true,
|
"named": true,
|
||||||
@@ -1814,17 +2122,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "spaceless_group",
|
"type": "spaceless_clause",
|
||||||
"named": true,
|
"named": true,
|
||||||
"fields": {
|
"fields": {
|
||||||
"tag": {
|
"tag": {
|
||||||
"multiple": true,
|
"multiple": false,
|
||||||
"required": true,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
|
||||||
"type": "endspaceless",
|
|
||||||
"named": false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "spaceless",
|
"type": "spaceless",
|
||||||
"named": false
|
"named": false
|
||||||
@@ -1843,6 +2147,32 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "spaceless_group",
|
||||||
|
"named": true,
|
||||||
|
"fields": {
|
||||||
|
"tag": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "endspaceless",
|
||||||
|
"named": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"children": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "spaceless_clause",
|
||||||
|
"named": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "static",
|
"type": "static",
|
||||||
"named": true,
|
"named": true,
|
||||||
@@ -1936,17 +2266,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "timezone_group",
|
"type": "timezone_clause",
|
||||||
"named": true,
|
"named": true,
|
||||||
"fields": {
|
"fields": {
|
||||||
"tag": {
|
"tag": {
|
||||||
"multiple": true,
|
"multiple": false,
|
||||||
"required": true,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
|
||||||
"type": "endtimezone",
|
|
||||||
"named": false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "timezone",
|
"type": "timezone",
|
||||||
"named": false
|
"named": false
|
||||||
@@ -1969,6 +2295,32 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "timezone_group",
|
||||||
|
"named": true,
|
||||||
|
"fields": {
|
||||||
|
"tag": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "endtimezone",
|
||||||
|
"named": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"children": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "timezone_clause",
|
||||||
|
"named": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "translate",
|
"type": "translate",
|
||||||
"named": true,
|
"named": true,
|
||||||
@@ -2181,17 +2533,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "with_group",
|
"type": "with_clause",
|
||||||
"named": true,
|
"named": true,
|
||||||
"fields": {
|
"fields": {
|
||||||
"tag": {
|
"tag": {
|
||||||
"multiple": true,
|
"multiple": false,
|
||||||
"required": true,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
|
||||||
"type": "endwith",
|
|
||||||
"named": false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "with",
|
"type": "with",
|
||||||
"named": false
|
"named": false
|
||||||
@@ -2224,6 +2572,32 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "with_group",
|
||||||
|
"named": true,
|
||||||
|
"fields": {
|
||||||
|
"tag": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "endwith",
|
||||||
|
"named": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"children": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "with_clause",
|
||||||
|
"named": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "!=",
|
"type": "!=",
|
||||||
"named": false
|
"named": false
|
||||||
@@ -2816,6 +3190,10 @@
|
|||||||
"type": "resetcycle",
|
"type": "resetcycle",
|
||||||
"named": false
|
"named": false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "reversed",
|
||||||
|
"named": false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "rjust",
|
"type": "rjust",
|
||||||
"named": false
|
"named": false
|
||||||
|
|||||||
+47693
-97298
File diff suppressed because it is too large.
Load diff
@@ -17,6 +17,7 @@ Autoescape
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(autoescape_group
|
(autoescape_group
|
||||||
(template
|
(autoescape_clause
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
+41
-50
@@ -17,9 +17,10 @@ Block
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(block_group
|
(block_group
|
||||||
(push_block)
|
(block_clause
|
||||||
(template
|
name: (push_block)
|
||||||
(content))
|
(template
|
||||||
|
(content)))
|
||||||
(pop_block))
|
(pop_block))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
@@ -42,9 +43,10 @@ Block Matching End Tag
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(block_group
|
(block_group
|
||||||
(push_block)
|
(block_clause
|
||||||
(template
|
name: (push_block)
|
||||||
(content))
|
(template
|
||||||
|
(content)))
|
||||||
(pop_block))
|
(pop_block))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
@@ -69,32 +71,17 @@ Nested Blocks
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(block_group
|
(block_group
|
||||||
(push_block)
|
(block_clause
|
||||||
(template
|
name: (push_block)
|
||||||
(content)
|
(template
|
||||||
(block_group
|
(content)
|
||||||
(push_block)
|
(block_group
|
||||||
(template
|
(block_clause
|
||||||
(content))
|
name: (push_block)
|
||||||
(pop_block))
|
(template
|
||||||
(content))
|
(content)))
|
||||||
(pop_block))
|
(pop_block))
|
||||||
(content))
|
(content)))
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(template
|
|
||||||
(content)
|
|
||||||
(block_group
|
|
||||||
(push_block)
|
|
||||||
(template
|
|
||||||
(content)
|
|
||||||
(block_group
|
|
||||||
(push_block)
|
|
||||||
(template
|
|
||||||
(content))
|
|
||||||
(pop_block))
|
|
||||||
(content))
|
|
||||||
(pop_block))
|
(pop_block))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
@@ -119,15 +106,17 @@ Nested Blocks End Tag
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(block_group
|
(block_group
|
||||||
(push_block)
|
(block_clause
|
||||||
(template
|
name: (push_block)
|
||||||
(content)
|
(template
|
||||||
(block_group
|
(content)
|
||||||
(push_block)
|
(block_group
|
||||||
(template
|
(block_clause
|
||||||
(content))
|
name: (push_block)
|
||||||
(pop_block))
|
(template
|
||||||
(content))
|
(content)))
|
||||||
|
(pop_block))
|
||||||
|
(content)))
|
||||||
(pop_block))
|
(pop_block))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
@@ -152,14 +141,16 @@ Nested Blocks Mixed Tags
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(block_group
|
(block_group
|
||||||
(push_block)
|
(block_clause
|
||||||
(template
|
name: (push_block)
|
||||||
(content)
|
(template
|
||||||
(block_group
|
(content)
|
||||||
(push_block)
|
(block_group
|
||||||
(template
|
(block_clause
|
||||||
(content))
|
name: (push_block)
|
||||||
(pop_block))
|
(template
|
||||||
(content))
|
(content)))
|
||||||
|
(pop_block))
|
||||||
|
(content)))
|
||||||
(pop_block))
|
(pop_block))
|
||||||
(content))
|
(content))
|
||||||
@@ -165,7 +165,7 @@ Blocktrans With Asvar
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(blocktranslate_group
|
(blocktranslate_group
|
||||||
variable: (identifier)
|
asvar: (identifier)
|
||||||
(content))
|
(content))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
@@ -214,7 +214,7 @@ Blocktrans With Every Option
|
|||||||
(value
|
(value
|
||||||
(literal
|
(literal
|
||||||
(string))))
|
(string))))
|
||||||
variable: (identifier)
|
asvar: (identifier)
|
||||||
(content)
|
(content)
|
||||||
(content))
|
(content))
|
||||||
(content))
|
(content))
|
||||||
@@ -230,7 +230,7 @@ Blocktrans With Its Options Reordered
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(blocktranslate_group
|
(blocktranslate_group
|
||||||
variable: (identifier)
|
asvar: (identifier)
|
||||||
(content))
|
(content))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
|
|||||||
+91
-83
@@ -9,13 +9,14 @@ Cache
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(cache_group
|
(cache_group
|
||||||
(filtered_value
|
(cache_clause
|
||||||
(value
|
(filtered_value
|
||||||
(literal
|
(value
|
||||||
(number))))
|
(literal
|
||||||
(identifier)
|
(number))))
|
||||||
(template
|
(identifier)
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -29,13 +30,14 @@ Cache With A Variable Timeout
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(cache_group
|
(cache_group
|
||||||
(filtered_value
|
(cache_clause
|
||||||
(value
|
(filtered_value
|
||||||
(variable_attribute
|
(value
|
||||||
(identifier))))
|
(variable_attribute
|
||||||
(identifier)
|
(identifier))))
|
||||||
(template
|
(identifier)
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -49,18 +51,19 @@ Cache With A Filtered Timeout
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(cache_group
|
(cache_group
|
||||||
(filtered_value
|
(cache_clause
|
||||||
(value
|
(filtered_value
|
||||||
(literal
|
(value
|
||||||
(number)))
|
(literal
|
||||||
(filter_expression
|
(number)))
|
||||||
(filter
|
(filter_expression
|
||||||
argument: (value
|
(filter
|
||||||
(literal
|
argument: (value
|
||||||
(number))))))
|
(literal
|
||||||
(identifier)
|
(number))))))
|
||||||
(template
|
(identifier)
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -74,13 +77,14 @@ Cache With A Quoted Fragment Name
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(cache_group
|
(cache_group
|
||||||
(filtered_value
|
(cache_clause
|
||||||
(value
|
(filtered_value
|
||||||
(literal
|
(value
|
||||||
(number))))
|
(literal
|
||||||
(string)
|
(number))))
|
||||||
(template
|
(string)
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -94,21 +98,22 @@ Cache Varying On Arguments
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(cache_group
|
(cache_group
|
||||||
(filtered_value
|
(cache_clause
|
||||||
(value
|
(filtered_value
|
||||||
(literal
|
(value
|
||||||
(number))))
|
(literal
|
||||||
(identifier)
|
(number))))
|
||||||
(filtered_value
|
(identifier)
|
||||||
(value
|
(filtered_value
|
||||||
(variable_attribute
|
(value
|
||||||
(identifier))))
|
(variable_attribute
|
||||||
(filtered_value
|
(identifier))))
|
||||||
(value
|
(filtered_value
|
||||||
(variable_attribute
|
(value
|
||||||
(identifier))))
|
(variable_attribute
|
||||||
(template
|
(identifier))))
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -122,19 +127,20 @@ Cache Varying On A Filtered Argument
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(cache_group
|
(cache_group
|
||||||
(filtered_value
|
(cache_clause
|
||||||
(value
|
(filtered_value
|
||||||
(literal
|
(value
|
||||||
(number))))
|
(literal
|
||||||
(identifier)
|
(number))))
|
||||||
(filtered_value
|
(identifier)
|
||||||
(value
|
(filtered_value
|
||||||
(variable_attribute
|
(value
|
||||||
(identifier)))
|
(variable_attribute
|
||||||
(filter_expression
|
(identifier)))
|
||||||
(filter)))
|
(filter_expression
|
||||||
(template
|
(filter)))
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -148,17 +154,18 @@ Cache Using A Named Cache
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(cache_group
|
(cache_group
|
||||||
(filtered_value
|
(cache_clause
|
||||||
(value
|
(filtered_value
|
||||||
(literal
|
(value
|
||||||
(number))))
|
(literal
|
||||||
(identifier)
|
(number))))
|
||||||
(filtered_value
|
(identifier)
|
||||||
(value
|
(filtered_value
|
||||||
(literal
|
(value
|
||||||
(string))))
|
(literal
|
||||||
(template
|
(string))))
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -172,17 +179,18 @@ Cache Using An Unquoted Cache Name
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(cache_group
|
(cache_group
|
||||||
(filtered_value
|
(cache_clause
|
||||||
(value
|
(filtered_value
|
||||||
(literal
|
(value
|
||||||
(number))))
|
(literal
|
||||||
(identifier)
|
(number))))
|
||||||
(filtered_value
|
(identifier)
|
||||||
(value
|
(filtered_value
|
||||||
(variable_attribute
|
(value
|
||||||
(identifier))))
|
(variable_attribute
|
||||||
(template
|
(identifier))))
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
|
|||||||
+17
-15
@@ -13,10 +13,11 @@ hello
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(filter_group
|
(filter_group
|
||||||
(filter_expression
|
(filter_clause
|
||||||
(filter))
|
(filter_expression
|
||||||
(template
|
(filter))
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -34,11 +35,12 @@ HELLO WORLD
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(filter_group
|
(filter_group
|
||||||
(filter_expression
|
(filter_clause
|
||||||
(filter)
|
(filter_expression
|
||||||
(filter))
|
(filter)
|
||||||
(template
|
(filter))
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -57,10 +59,10 @@ HELLO WORLD
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(filter_group
|
(filter_group
|
||||||
(filter_expression
|
(filter_clause
|
||||||
(filter)
|
(filter_expression
|
||||||
(filter))
|
(filter)
|
||||||
(template
|
(filter))
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
+365
-5
@@ -13,7 +13,7 @@ For Basic
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(for_group
|
(for_group
|
||||||
(for_scope
|
(for_clause
|
||||||
variable: (identifier)
|
variable: (identifier)
|
||||||
(filtered_value
|
(filtered_value
|
||||||
(value
|
(value
|
||||||
@@ -44,7 +44,7 @@ For With Multiple Variables
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(for_group
|
(for_group
|
||||||
(for_scope
|
(for_clause
|
||||||
variable: (identifier)
|
variable: (identifier)
|
||||||
variable: (identifier)
|
variable: (identifier)
|
||||||
(filtered_value
|
(filtered_value
|
||||||
@@ -78,7 +78,7 @@ For With Empty
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(for_group
|
(for_group
|
||||||
(for_scope
|
(for_clause
|
||||||
variable: (identifier)
|
variable: (identifier)
|
||||||
(filtered_value
|
(filtered_value
|
||||||
(value
|
(value
|
||||||
@@ -92,6 +92,366 @@ For With Empty
|
|||||||
(variable_attribute
|
(variable_attribute
|
||||||
(identifier)))))
|
(identifier)))))
|
||||||
(content)))
|
(content)))
|
||||||
(template
|
(empty_clause
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
|
==================
|
||||||
|
For With A Tag In Its Body
|
||||||
|
==================
|
||||||
|
|
||||||
|
{% for x in y %}
|
||||||
|
{% if a %}b{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
(template
|
||||||
|
(content)
|
||||||
|
(for_group
|
||||||
|
(for_clause
|
||||||
|
variable: (identifier)
|
||||||
|
(filtered_value
|
||||||
|
(value
|
||||||
|
(variable_attribute
|
||||||
|
(identifier))))
|
||||||
|
(template
|
||||||
|
(content)
|
||||||
|
(if_group
|
||||||
|
(if_clause
|
||||||
|
(predicate
|
||||||
|
(filtered_value
|
||||||
|
(value
|
||||||
|
(variable_attribute
|
||||||
|
(identifier)))))
|
||||||
|
(template
|
||||||
|
(content))))
|
||||||
|
(content))))
|
||||||
|
(content))
|
||||||
|
|
||||||
|
==================
|
||||||
|
For With A Nested For
|
||||||
|
==================
|
||||||
|
|
||||||
|
{% for x in y %}
|
||||||
|
{% for z in x %}a{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
(template
|
||||||
|
(content)
|
||||||
|
(for_group
|
||||||
|
(for_clause
|
||||||
|
variable: (identifier)
|
||||||
|
(filtered_value
|
||||||
|
(value
|
||||||
|
(variable_attribute
|
||||||
|
(identifier))))
|
||||||
|
(template
|
||||||
|
(content)
|
||||||
|
(for_group
|
||||||
|
(for_clause
|
||||||
|
variable: (identifier)
|
||||||
|
(filtered_value
|
||||||
|
(value
|
||||||
|
(variable_attribute
|
||||||
|
(identifier))))
|
||||||
|
(template
|
||||||
|
(content))))
|
||||||
|
(content))))
|
||||||
|
(content))
|
||||||
|
|
||||||
|
==================
|
||||||
|
For With Tags In Both Branches
|
||||||
|
==================
|
||||||
|
|
||||||
|
{% for x in y %}
|
||||||
|
{% if a %}b{% endif %}
|
||||||
|
{% empty %}
|
||||||
|
{% with c=1 %}d{% endwith %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
(template
|
||||||
|
(content)
|
||||||
|
(for_group
|
||||||
|
(for_clause
|
||||||
|
variable: (identifier)
|
||||||
|
(filtered_value
|
||||||
|
(value
|
||||||
|
(variable_attribute
|
||||||
|
(identifier))))
|
||||||
|
(template
|
||||||
|
(content)
|
||||||
|
(if_group
|
||||||
|
(if_clause
|
||||||
|
(predicate
|
||||||
|
(filtered_value
|
||||||
|
(value
|
||||||
|
(variable_attribute
|
||||||
|
(identifier)))))
|
||||||
|
(template
|
||||||
|
(content))))
|
||||||
|
(content)))
|
||||||
|
(empty_clause
|
||||||
|
(template
|
||||||
|
(content)
|
||||||
|
(with_group
|
||||||
|
(with_clause
|
||||||
|
variable: (identifier)
|
||||||
|
(filtered_value
|
||||||
|
(value
|
||||||
|
(literal
|
||||||
|
(number))))
|
||||||
|
(template
|
||||||
|
(content))))
|
||||||
|
(content))))
|
||||||
|
(content))
|
||||||
|
|
||||||
|
==================
|
||||||
|
For With A Named Block In Its Body
|
||||||
|
==================
|
||||||
|
|
||||||
|
{% for x in y %}
|
||||||
|
{% block b %}c{% endblock b %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
(template
|
||||||
|
(content)
|
||||||
|
(for_group
|
||||||
|
(for_clause
|
||||||
|
variable: (identifier)
|
||||||
|
(filtered_value
|
||||||
|
(value
|
||||||
|
(variable_attribute
|
||||||
|
(identifier))))
|
||||||
|
(template
|
||||||
|
(content)
|
||||||
|
(block_group
|
||||||
|
(block_clause
|
||||||
|
name: (push_block)
|
||||||
|
(template
|
||||||
|
(content)))
|
||||||
|
(pop_block))
|
||||||
|
(content))))
|
||||||
|
(content))
|
||||||
|
|
||||||
|
==================
|
||||||
|
For Nested In A Tag
|
||||||
|
==================
|
||||||
|
|
||||||
|
{% if a %}
|
||||||
|
{% for x in y %}{% if b %}c{% endif %}{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
(template
|
||||||
|
(content)
|
||||||
|
(if_group
|
||||||
|
(if_clause
|
||||||
|
(predicate
|
||||||
|
(filtered_value
|
||||||
|
(value
|
||||||
|
(variable_attribute
|
||||||
|
(identifier)))))
|
||||||
|
(template
|
||||||
|
(content)
|
||||||
|
(for_group
|
||||||
|
(for_clause
|
||||||
|
variable: (identifier)
|
||||||
|
(filtered_value
|
||||||
|
(value
|
||||||
|
(variable_attribute
|
||||||
|
(identifier))))
|
||||||
|
(template
|
||||||
|
(if_group
|
||||||
|
(if_clause
|
||||||
|
(predicate
|
||||||
|
(filtered_value
|
||||||
|
(value
|
||||||
|
(variable_attribute
|
||||||
|
(identifier)))))
|
||||||
|
(template
|
||||||
|
(content)))))))
|
||||||
|
(content))))
|
||||||
|
(content))
|
||||||
|
|
||||||
|
==================
|
||||||
|
For With An Empty Body
|
||||||
|
==================
|
||||||
|
|
||||||
|
{% for x in y %}{% endfor %}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
(template
|
||||||
|
(content)
|
||||||
|
(for_group
|
||||||
|
(for_clause
|
||||||
|
variable: (identifier)
|
||||||
|
(filtered_value
|
||||||
|
(value
|
||||||
|
(variable_attribute
|
||||||
|
(identifier))))))
|
||||||
|
(content))
|
||||||
|
|
||||||
|
==================
|
||||||
|
For Reversed
|
||||||
|
==================
|
||||||
|
|
||||||
|
{% for x in y reversed %}
|
||||||
|
a
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
(template
|
||||||
|
(content)
|
||||||
|
(for_group
|
||||||
|
(for_clause
|
||||||
|
variable: (identifier)
|
||||||
|
(filtered_value
|
||||||
|
(value
|
||||||
|
(variable_attribute
|
||||||
|
(identifier))))
|
||||||
|
(template
|
||||||
|
(content))))
|
||||||
|
(content))
|
||||||
|
|
||||||
|
==================
|
||||||
|
For With Multiple Variables Reversed
|
||||||
|
==================
|
||||||
|
|
||||||
|
{% for k,v in y reversed %}
|
||||||
|
a
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
(template
|
||||||
|
(content)
|
||||||
|
(for_group
|
||||||
|
(for_clause
|
||||||
|
variable: (identifier)
|
||||||
|
variable: (identifier)
|
||||||
|
(filtered_value
|
||||||
|
(value
|
||||||
|
(variable_attribute
|
||||||
|
(identifier))))
|
||||||
|
(template
|
||||||
|
(content))))
|
||||||
|
(content))
|
||||||
|
|
||||||
|
==================
|
||||||
|
For With A Filtered Sequence Reversed
|
||||||
|
==================
|
||||||
|
|
||||||
|
{% for x in y|slice:":2" reversed %}
|
||||||
|
a
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
(template
|
||||||
|
(content)
|
||||||
|
(for_group
|
||||||
|
(for_clause
|
||||||
|
variable: (identifier)
|
||||||
|
(filtered_value
|
||||||
|
(value
|
||||||
|
(variable_attribute
|
||||||
|
(identifier)))
|
||||||
|
(filter_expression
|
||||||
|
(filter
|
||||||
|
argument: (value
|
||||||
|
(literal
|
||||||
|
(string))))))
|
||||||
|
(template
|
||||||
|
(content))))
|
||||||
|
(content))
|
||||||
|
|
||||||
|
==================
|
||||||
|
For Reversed With Empty
|
||||||
|
==================
|
||||||
|
|
||||||
|
{% for x in y reversed %}
|
||||||
|
a
|
||||||
|
{% empty %}
|
||||||
|
b
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
(template
|
||||||
|
(content)
|
||||||
|
(for_group
|
||||||
|
(for_clause
|
||||||
|
variable: (identifier)
|
||||||
|
(filtered_value
|
||||||
|
(value
|
||||||
|
(variable_attribute
|
||||||
|
(identifier))))
|
||||||
|
(template
|
||||||
|
(content)))
|
||||||
|
(empty_clause
|
||||||
|
(template
|
||||||
|
(content))))
|
||||||
|
(content))
|
||||||
|
|
||||||
|
==================
|
||||||
|
For Reversed With A Tag In Its Body
|
||||||
|
==================
|
||||||
|
|
||||||
|
{% for x in y reversed %}
|
||||||
|
{% if a %}b{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
(template
|
||||||
|
(content)
|
||||||
|
(for_group
|
||||||
|
(for_clause
|
||||||
|
variable: (identifier)
|
||||||
|
(filtered_value
|
||||||
|
(value
|
||||||
|
(variable_attribute
|
||||||
|
(identifier))))
|
||||||
|
(template
|
||||||
|
(content)
|
||||||
|
(if_group
|
||||||
|
(if_clause
|
||||||
|
(predicate
|
||||||
|
(filtered_value
|
||||||
|
(value
|
||||||
|
(variable_attribute
|
||||||
|
(identifier)))))
|
||||||
|
(template
|
||||||
|
(content))))
|
||||||
|
(content))))
|
||||||
|
(content))
|
||||||
|
|
||||||
|
==================
|
||||||
|
For With Reversed Twice
|
||||||
|
:error
|
||||||
|
==================
|
||||||
|
|
||||||
|
{% for x in y reversed reversed %}a{% endfor %}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
==================
|
||||||
|
For With Reversed Before In
|
||||||
|
:error
|
||||||
|
==================
|
||||||
|
|
||||||
|
{% for x reversed in y %}a{% endfor %}
|
||||||
|
|
||||||
|
---
|
||||||
+14
-12
@@ -355,12 +355,13 @@ Language
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(language_group
|
(language_group
|
||||||
(filtered_value
|
(language_clause
|
||||||
(value
|
(filtered_value
|
||||||
(literal
|
(value
|
||||||
(string))))
|
(literal
|
||||||
(template
|
(string))))
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -374,12 +375,13 @@ Language With A Variable
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(language_group
|
(language_group
|
||||||
(filtered_value
|
(language_clause
|
||||||
(value
|
(filtered_value
|
||||||
(variable_attribute
|
(value
|
||||||
(identifier))))
|
(variable_attribute
|
||||||
(template
|
(identifier))))
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
|
|||||||
+86
-82
@@ -11,14 +11,15 @@ Hi
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(if_group
|
(if_group
|
||||||
(predicate
|
(if_clause
|
||||||
(filtered_value
|
(predicate
|
||||||
(value
|
(filtered_value
|
||||||
(variable_attribute
|
(value
|
||||||
(identifier)
|
(variable_attribute
|
||||||
(attribute)))))
|
(identifier)
|
||||||
(template
|
(attribute)))))
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -34,13 +35,14 @@ working
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(if_group
|
(if_group
|
||||||
(predicate
|
(if_clause
|
||||||
(filtered_value
|
(predicate
|
||||||
(value
|
(filtered_value
|
||||||
(variable_attribute
|
(value
|
||||||
(identifier)))))
|
(variable_attribute
|
||||||
(template
|
(identifier)))))
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -60,32 +62,35 @@ other
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(if_group
|
(if_group
|
||||||
(predicate
|
(if_clause
|
||||||
(filtered_value
|
(predicate
|
||||||
(value
|
(filtered_value
|
||||||
(variable_attribute
|
(value
|
||||||
(identifier))))
|
(variable_attribute
|
||||||
(binaryOperator)
|
(identifier))))
|
||||||
(filtered_value
|
(binaryOperator)
|
||||||
(value
|
(filtered_value
|
||||||
(literal
|
(value
|
||||||
(number)))))
|
(literal
|
||||||
(template
|
(number)))))
|
||||||
(content))
|
(template
|
||||||
(predicate
|
(content)))
|
||||||
(filtered_value
|
(elif_clause
|
||||||
(value
|
(predicate
|
||||||
(variable_attribute
|
(filtered_value
|
||||||
(identifier))))
|
(value
|
||||||
(binaryOperator)
|
(variable_attribute
|
||||||
(filtered_value
|
(identifier))))
|
||||||
(value
|
(binaryOperator)
|
||||||
(literal
|
(filtered_value
|
||||||
(number)))))
|
(value
|
||||||
(template
|
(literal
|
||||||
(content))
|
(number)))))
|
||||||
(template
|
(template
|
||||||
(content)))
|
(content)))
|
||||||
|
(else_clause
|
||||||
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -101,45 +106,46 @@ yes
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(if_group
|
(if_group
|
||||||
(predicate
|
(if_clause
|
||||||
(filtered_value
|
(predicate
|
||||||
(value
|
(filtered_value
|
||||||
(variable_attribute
|
(value
|
||||||
(identifier))))
|
(variable_attribute
|
||||||
(binaryOperator)
|
(identifier))))
|
||||||
(filtered_value
|
(binaryOperator)
|
||||||
(value
|
(filtered_value
|
||||||
(variable_attribute
|
(value
|
||||||
(identifier))))
|
(variable_attribute
|
||||||
(binaryOperator)
|
(identifier))))
|
||||||
(filtered_value
|
(binaryOperator)
|
||||||
(value
|
(filtered_value
|
||||||
(variable_attribute
|
(value
|
||||||
(identifier))))
|
(variable_attribute
|
||||||
(binaryOperator)
|
(identifier))))
|
||||||
(filtered_value
|
(binaryOperator)
|
||||||
(value
|
(filtered_value
|
||||||
(variable_attribute
|
(value
|
||||||
(identifier))))
|
(variable_attribute
|
||||||
(binaryOperator)
|
(identifier))))
|
||||||
(filtered_value
|
(binaryOperator)
|
||||||
(value
|
(filtered_value
|
||||||
(variable_attribute
|
(value
|
||||||
(identifier))))
|
(variable_attribute
|
||||||
(binaryOperator)
|
(identifier))))
|
||||||
(filtered_value
|
(binaryOperator)
|
||||||
(value
|
(filtered_value
|
||||||
(variable_attribute
|
(value
|
||||||
(identifier)))
|
(variable_attribute
|
||||||
(filter_expression
|
(identifier)))
|
||||||
(filter)))
|
(filter_expression
|
||||||
(binaryOperator)
|
(filter)))
|
||||||
(filtered_value
|
(binaryOperator)
|
||||||
(value
|
(filtered_value
|
||||||
(literal
|
(value
|
||||||
(number)))))
|
(literal
|
||||||
(template
|
(number)))))
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -150,5 +156,3 @@ If Operator Adjacent To Value
|
|||||||
{% if 1and 2 %}yes{% endif %}
|
{% if 1and 2 %}yes{% endif %}
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
(ERROR)
|
|
||||||
+54
-42
@@ -11,8 +11,9 @@ content
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(ifchanged_group
|
(ifchanged_group
|
||||||
(template
|
(ifchanged_clause
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -28,16 +29,17 @@ content
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(ifchanged_group
|
(ifchanged_group
|
||||||
(filtered_value
|
(ifchanged_clause
|
||||||
(value
|
(filtered_value
|
||||||
(variable_attribute
|
(value
|
||||||
(identifier))))
|
(variable_attribute
|
||||||
(filtered_value
|
(identifier))))
|
||||||
(value
|
(filtered_value
|
||||||
(variable_attribute
|
(value
|
||||||
(identifier))))
|
(variable_attribute
|
||||||
(template
|
(identifier))))
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -55,10 +57,12 @@ unchanged
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(ifchanged_group
|
(ifchanged_group
|
||||||
(template
|
(ifchanged_clause
|
||||||
(content))
|
(template
|
||||||
(template
|
(content)))
|
||||||
(content)))
|
(else_clause
|
||||||
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -76,20 +80,22 @@ unchanged
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(ifchanged_group
|
(ifchanged_group
|
||||||
(filtered_value
|
(ifchanged_clause
|
||||||
(value
|
(filtered_value
|
||||||
(variable_attribute
|
(value
|
||||||
(identifier))))
|
(variable_attribute
|
||||||
(filtered_value
|
(identifier))))
|
||||||
(value
|
(filtered_value
|
||||||
(variable_attribute
|
(value
|
||||||
(identifier)))
|
(variable_attribute
|
||||||
(filter_expression
|
(identifier)))
|
||||||
(filter)))
|
(filter_expression
|
||||||
(template
|
(filter)))
|
||||||
(content))
|
(template
|
||||||
(template
|
(content)))
|
||||||
(content)))
|
(else_clause
|
||||||
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -105,8 +111,10 @@ content
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(ifchanged_group
|
(ifchanged_group
|
||||||
(template
|
(ifchanged_clause
|
||||||
(content)))
|
(template
|
||||||
|
(content)))
|
||||||
|
(else_clause))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -128,16 +136,20 @@ c
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(ifchanged_group
|
(ifchanged_group
|
||||||
(template
|
(ifchanged_clause
|
||||||
(content))
|
(template
|
||||||
(template
|
(content)))
|
||||||
(content)
|
(else_clause
|
||||||
(ifchanged_group
|
(template
|
||||||
(template
|
(content)
|
||||||
(content))
|
(ifchanged_group
|
||||||
(template
|
(ifchanged_clause
|
||||||
(content)))
|
(template
|
||||||
(content)))
|
(content)))
|
||||||
|
(else_clause
|
||||||
|
(template
|
||||||
|
(content))))
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
|
|||||||
+18
-12
@@ -9,8 +9,9 @@ Localize
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(localize_group
|
(localize_group
|
||||||
(template
|
(localize_clause
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -24,8 +25,9 @@ Localize On
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(localize_group
|
(localize_group
|
||||||
(template
|
(localize_clause
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -39,8 +41,9 @@ Localize Off
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(localize_group
|
(localize_group
|
||||||
(template
|
(localize_clause
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -54,8 +57,9 @@ Localize Hugging Its Delimiters
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(localize_group
|
(localize_group
|
||||||
(template
|
(localize_clause
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -69,10 +73,12 @@ Localize Nested
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(localize_group
|
(localize_group
|
||||||
(template
|
(localize_clause
|
||||||
(localize_group
|
(template
|
||||||
(template
|
(localize_group
|
||||||
(content)))))
|
(localize_clause
|
||||||
|
(template
|
||||||
|
(content)))))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
|
|||||||
@@ -13,9 +13,10 @@ Partialdef Basic
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(partialdef_group
|
(partialdef_group
|
||||||
(push_partial)
|
(partialdef_clause
|
||||||
(template
|
(push_partial)
|
||||||
(content))
|
(template
|
||||||
|
(content)))
|
||||||
(pop_partial))
|
(pop_partial))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
@@ -34,8 +35,9 @@ Partialdef Inline
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(partialdef_group
|
(partialdef_group
|
||||||
(push_partial)
|
(partialdef_clause
|
||||||
(template
|
(push_partial)
|
||||||
(content))
|
(template
|
||||||
|
(content)))
|
||||||
(pop_partial))
|
(pop_partial))
|
||||||
(content))
|
(content))
|
||||||
@@ -13,6 +13,7 @@ Spaceless Basic
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(spaceless_group
|
(spaceless_group
|
||||||
(template
|
(spaceless_clause
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
@@ -174,7 +174,7 @@ Template Variable With Filter Argument
|
|||||||
(identifier)))
|
(identifier)))
|
||||||
(filter_expression
|
(filter_expression
|
||||||
(filter
|
(filter
|
||||||
(value
|
argument: (value
|
||||||
(literal
|
(literal
|
||||||
(string)))))))
|
(string)))))))
|
||||||
(content))
|
(content))
|
||||||
@@ -196,7 +196,7 @@ Template Variable Number With Filter Argument
|
|||||||
(number)))
|
(number)))
|
||||||
(filter_expression
|
(filter_expression
|
||||||
(filter
|
(filter
|
||||||
(value
|
argument: (value
|
||||||
(literal
|
(literal
|
||||||
(number)))))))
|
(number)))))))
|
||||||
(content))
|
(content))
|
||||||
@@ -210,7 +210,6 @@ Template Variable Literal Adjacent To Name
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
(ERROR)
|
|
||||||
|
|
||||||
==================
|
==================
|
||||||
Template Variable With Escaped String
|
Template Variable With Escaped String
|
||||||
@@ -272,7 +271,6 @@ Template Variable Attribute Beginning With Underscore
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
(ERROR)
|
|
||||||
|
|
||||||
==================
|
==================
|
||||||
Template Variable Translated String
|
Template Variable Translated String
|
||||||
@@ -321,7 +319,6 @@ Template Variable Translated String With Spaces
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
(ERROR)
|
|
||||||
|
|
||||||
==================
|
==================
|
||||||
Template Variable Spanning Lines
|
Template Variable Spanning Lines
|
||||||
@@ -341,7 +338,7 @@ Template Variable Spanning Lines
|
|||||||
(identifier)))
|
(identifier)))
|
||||||
(filter_expression
|
(filter_expression
|
||||||
(filter
|
(filter
|
||||||
(value
|
argument: (value
|
||||||
(literal
|
(literal
|
||||||
(number)))))))
|
(number)))))))
|
||||||
(content))
|
(content))
|
||||||
@@ -364,4 +361,3 @@ Template Variable With Spaced Filter
|
|||||||
(filter_expression
|
(filter_expression
|
||||||
(filter))))
|
(filter))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
+32
-26
@@ -9,8 +9,9 @@ Localtime
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(localtime_group
|
(localtime_group
|
||||||
(template
|
(localtime_clause
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -24,8 +25,9 @@ Localtime On
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(localtime_group
|
(localtime_group
|
||||||
(template
|
(localtime_clause
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -39,8 +41,9 @@ Localtime Off
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(localtime_group
|
(localtime_group
|
||||||
(template
|
(localtime_clause
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -74,12 +77,13 @@ Timezone
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(timezone_group
|
(timezone_group
|
||||||
(filtered_value
|
(timezone_clause
|
||||||
(value
|
(filtered_value
|
||||||
(literal
|
(value
|
||||||
(string))))
|
(literal
|
||||||
(template
|
(string))))
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -93,12 +97,13 @@ Timezone With A Variable
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(timezone_group
|
(timezone_group
|
||||||
(filtered_value
|
(timezone_clause
|
||||||
(value
|
(filtered_value
|
||||||
(variable_attribute
|
(value
|
||||||
(identifier))))
|
(variable_attribute
|
||||||
(template
|
(identifier))))
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -112,14 +117,15 @@ Timezone With A Filtered Argument
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(timezone_group
|
(timezone_group
|
||||||
(filtered_value
|
(timezone_clause
|
||||||
(value
|
(filtered_value
|
||||||
(variable_attribute
|
(value
|
||||||
(identifier)))
|
(variable_attribute
|
||||||
(filter_expression
|
(identifier)))
|
||||||
(filter)))
|
(filter_expression
|
||||||
(template
|
(filter)))
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
|
|||||||
+50
-46
@@ -11,20 +11,21 @@ With Basic
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(with_group
|
(with_group
|
||||||
variable: (identifier)
|
(with_clause
|
||||||
(filtered_value
|
variable: (identifier)
|
||||||
(value
|
(filtered_value
|
||||||
(variable_attribute
|
(value
|
||||||
(identifier)
|
(variable_attribute
|
||||||
(attribute))))
|
(identifier)
|
||||||
(template
|
(attribute))))
|
||||||
(content)
|
(template
|
||||||
(template_variable
|
(content)
|
||||||
(filtered_value
|
(template_variable
|
||||||
(value
|
(filtered_value
|
||||||
(variable_attribute
|
(value
|
||||||
(identifier)))))
|
(variable_attribute
|
||||||
(content)))
|
(identifier)))))
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -40,24 +41,25 @@ With Multiple Variables
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(with_group
|
(with_group
|
||||||
variable: (identifier)
|
(with_clause
|
||||||
(filtered_value
|
variable: (identifier)
|
||||||
(value
|
(filtered_value
|
||||||
(literal
|
(value
|
||||||
(number))))
|
(literal
|
||||||
variable: (identifier)
|
(number))))
|
||||||
(filtered_value
|
variable: (identifier)
|
||||||
(value
|
(filtered_value
|
||||||
(literal
|
(value
|
||||||
(number))))
|
(literal
|
||||||
(template
|
(number))))
|
||||||
(content)
|
(template
|
||||||
(template_variable
|
(content)
|
||||||
(filtered_value
|
(template_variable
|
||||||
(value
|
(filtered_value
|
||||||
(variable_attribute
|
(value
|
||||||
(identifier)))))
|
(variable_attribute
|
||||||
(content)))
|
(identifier)))))
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -91,19 +93,21 @@ With Repeating A Binding Of The Tag Before It
|
|||||||
(template
|
(template
|
||||||
(content)
|
(content)
|
||||||
(with_group
|
(with_group
|
||||||
variable: (identifier)
|
(with_clause
|
||||||
(filtered_value
|
variable: (identifier)
|
||||||
(value
|
(filtered_value
|
||||||
(literal
|
(value
|
||||||
(number))))
|
(literal
|
||||||
(template
|
(number))))
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(with_group
|
(with_group
|
||||||
variable: (identifier)
|
(with_clause
|
||||||
(filtered_value
|
variable: (identifier)
|
||||||
(value
|
(filtered_value
|
||||||
(literal
|
(value
|
||||||
(number))))
|
(literal
|
||||||
(template
|
(number))))
|
||||||
(content)))
|
(template
|
||||||
|
(content))))
|
||||||
(content))
|
(content))
|
||||||
Reference in new issue
Block a user