massive rename

This commit is contained in:
danhanson committed 2026-09-14 15:59:53 -05:00
1 parent cb8c9f9c0b
commit 9f2fdaf746
49 files changed
+6237 -6262

No files matched your search

+65 -65
View File
@@ -50,16 +50,16 @@ that place it:
`$._sep`. Newlines included: Django matches tags with `re.DOTALL`, so tags may span lines. `$._sep`. Newlines included: Django matches tags with `re.DOTALL`, so tags may span lines.
- `part(...)` — one tag part, taking the whitespace that separates it from the part before. - `part(...)` — one tag part, taking the whitespace that separates it from the part before.
- `joined(first, ...rest)` — parts separated from _each other_, with no leading separator (`not in`). - `joined(first, ...rest)` — parts separated from _each other_, with no leading separator (`not in`).
- `block(tag, ...args)` — `{%`, optional separator, tag name, args, optional separator, `%}`; tags may - `tag(name, ...args)` — `{%`, optional separator, tag name, args, optional separator, `%}`; tags may
hug their delimiters (`{%cycle 1%}`). hug their delimiters (`{%cycle 1%}`).
- `asVariable($)` — the `as name` clause. Every tag that takes one names the target `field("variable", …)`; - `asVariable($)` — the `as name` clause. Every tag that takes one names the target `field("variable", …)`;
do not invent a second name for it. do not invent a second name for it.
- `simpleTag($, tag, args, kwargs)` — a tag registered with Django's `simple_tag`, which always accepts - `simpleTag($, name, args, kwargs)` — a tag registered with Django's `simple_tag`, which always accepts
positional filter expressions, then `name=value` keywords, then `as name`. `args`: `true` (`*args`), a positional filter expressions, then `name=value` keywords, then `as name`. `args`: `true` (`*args`), a
count (at most N), or `false`. `kwargs`: `true` (`**kwargs`), `false`, or `{name: rule}` for a known count (at most N), or `false`. `kwargs`: `true` (`**kwargs`), `false`, or `{name: rule}` for a known
signature. Put the Python signature in a comment above the call site. signature. Put the Python signature in a comment above the call site.
- `arrangements(items)` — every ordered subset of `items`, so that a tag's options may be written in any - `arrangements(items)` — every ordered subset of `items`, so that a tag's options may be written in any
order but never twice. Used by `translate_block` and `include_block`; keyword arguments are guarded by the scanner order but never twice. Used by `translate_tag` and `include_tag`; keyword arguments are guarded by the scanner
instead. Grows as `Σ C(n,k)·k!` (65 for four names), which is instead. Grows as `Σ C(n,k)·k!` (65 for four names), which is
why it is only used for signatures that name their arguments. why it is only used for signatures that name their arguments.
- `wordAsValueRules(word)` / `wordAsValue($, word, continued)` — a tag's own keyword written where a value - `wordAsValueRules(word)` / `wordAsValue($, word, continued)` — a tag's own keyword written where a value
@@ -86,82 +86,82 @@ Consequences worth knowing before editing a rule:
table is built and discards the other parse outright, which is how a bare `{% if x is y %}` came to be table is built and discards the other parse outright, which is how a bare `{% if x is y %}` came to be
an error. an error.
### A tag group is a sequence of clauses ### A tag group is a sequence of blocks
Every group is split so that each tag that opens a body owns a node of its own: Every group is split so that each tag that opens a body owns a node of its own:
```js ```js
if_block: ($) => startBlock("if", part($.predicate)), if_tag: ($) => startTag("if", part($.predicate)),
if_clause: ($) => seq($.if_block, optional($.template)), if_block: ($) => seq($.if_tag, optional($.template)),
endif_block: ($) => endBlock("endif"), endif_tag: ($) => endTag("endif"),
if_group: ($) => if_group: ($) =>
seq( seq(
$.if_clause, $.if_block,
repeat($.elif_clause), repeat($.elif_block),
optional($.else_clause), optional($.else_block),
choice($.endif_block, alias($._missing_block, $.missing_endif_block)), choice($.endif_tag, alias($._missing_tag, $.missing_endif_tag)),
), ),
``` ```
**A clause is complete without the closing tag, and that is the point.** While a template is being edited **A block 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 %}` 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 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 opened it. A block 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 to find the enclosing tag. That is what makes completion of `{% elif %}`, `{% else %}`, `{% empty %}` and
the end tags possible. the end tags possible.
**Every `{% %}` is a node of its own, named `<tag>_block`** after the tag as Django spells it: `if_block`, **Every `{% %}` is a node of its own, named `<name>_tag`** after the tag's name as Django spells it: `if_tag`,
`elif_block`, `endif_block`, `block_block`, `templatetag_block`, `custom_tag_block`. A clause is its `elif_tag`, `endif_tag`, `block_tag`, `templatetag_tag`, `custom_tag`. A block is its
opening block and a body; a group is its clauses and its end block. A block ends at `%}` and nothing can opening tag and a body; a group is its blocks and its end tag. A tag ends at `%}` and nothing can
extend it, so it reduces on whatever token follows — the end of input included — and a half-written extend it, so it reduces on whatever token follows — the end of input included — and a half-written
template still holds the last `{% for … %}` or `{% endif %}` typed as a whole node, not as loose tokens. template still holds the last `{% for … %}` or `{% endif %}` typed as a whole node, not as loose tokens.
Stripping `_block` gives the name; a new tag, or a tag group's new part, follows the same scheme. Stripping `_tag` gives the tag name; a new tag, or a tag group's new part, follows the same scheme.
A group's last child is its end block or, where the end tag is missing, a zero-width marker named for it A group's last child is its end block or, where the end tag is missing, a zero-width marker named for it
(`missing_endif_block`; see the scanner section). So an unterminated group still reduces to a group node, (`missing_endif_tag`; see the scanner section). So an unterminated group still reduces to a group node,
and a group's tag written where no open group can hold it is an `unexpected_block` (see the load section and a group's tag written where no open group can hold it is an `unexpected_tag` (see the load section
below), so only a body the grammar cannot read produces an `ERROR`. below), so only a body the grammar cannot read produces an `ERROR`.
Every tag is built from ten inline utility rules — `simpleBlockOpen`/`simpleBlockClose`, Every tag is built from ten inline utility rules — `simpleTagOpen`/`simpleTagClose`,
`startBlockOpen`/`startBlockClose`, `startTagOpen`/`startTagClose`,
`followBlockOpen`/`followBlockClose`, `repeatBlockOpen`/`repeatBlockClose`, `endBlockOpen`/`endBlockClose` — `followTagOpen`/`followTagClose`, `repeatTagOpen`/`repeatTagClose`, `endTagOpen`/`endTagClose` —
through the helpers `block` (a tag outside any group, from `simpleBlockOpen`/`simpleBlockClose`), `startBlock`, `followBlock` (a middle tag a group through the helpers `tag` (a tag outside any group, from `simpleTagOpen`/`simpleTagClose`), `startTag`, `followTag` (a middle tag a group
holds at most once: `else`, `empty`, `plural`), `repeatBlock` (one it may repeat: `elif`) and `endBlock`. holds at most once: `else`, `empty`, `plural`), `repeatTag` (one it may repeat: `elif`) and `endTag`.
They are inline rules rather than JS helpers so that a grammar extending this one can use them. **Every They are inline rules rather than JS helpers so that a grammar extending this one can use them. **Every
tag must begin with one of the opens**, one an extending grammar adds included: the token they read the tag must begin with one of the opens**, one an extending grammar adds included: the token they read the
tag's name with is valid wherever a tag's name is and the scanner always returns it, so a tag written from a bare `"{%"` never matches: its name is read as a `custom_tag_block` instead, tag's name with is valid wherever a tag's name is and the scanner always returns it, so a tag written from a bare `"{%"` never matches: its name is read as a `custom_tag` instead,
with no error to show for it. Choose `followBlock` or `repeatBlock` by what the grammar allows, because the with no error to show for it. Choose `followTag` or `repeatTag` by what the grammar allows, because the
scanner trusts it: a tag marked once-only that can in fact repeat is an `unexpected_block` from its scanner trusts it: a tag marked once-only that can in fact repeat is an `unexpected_tag` from its
second use on, and one marked repeatable that cannot is never flagged when repeated. second use on, and one marked repeatable that cannot is never flagged when repeated.
The names themselves need no hand-maintained list either: in the generated `src/node-types.json`, a group's 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 end block, and a clause's children include its opening block, so `children` are its block types and its end tag, and a block's children include its opening tag, so
the candidates for a group are its end block plus the opening block of each clause it can hold. For the candidates for a group are its end tag plus the opening tag of each block it can hold. For
`if_group` that is `endif_block` from the group and `if_block`, `elif_block`, `else_block` from its three `if_group` that is `endif_tag` from the group and `if_tag`, `elif_tag`, `else_tag` from its three
clauses. Going the other way — from a clause the cursor sits in to the blocks. Going the other way — from a block the cursor sits in to the
groups that can hold it — is the same table read backwards, which is what a clause needs when error groups that can hold it — is the same table read backwards, which is what a block needs when error
recovery has left it without its group. recovery has left it without its group.
Do not reach for lookahead to solve that instead: `ts_language_next_state` follows only the shift on `{%`, 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. 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_clause` and `verbatim_clause` hold raw `else_block` is shared by `if_group` and `ifchanged_group`. `comment_block` and `verbatim_block` hold raw
scanner text that admits no tags. `blocktranslate_group` has one clause per spelling, `blocktrans_clause` and scanner text that admits no tags. `blocktranslate_group` has one block per spelling, `blocktrans_block` and
`blocktranslate_clause`, because each must be closed by its own end tag; the counted form nests a `blocktranslate_block`, because each must be closed by its own end tag; the counted form nests a
`plural_clause` inside it, since `{% plural %}` is only valid after `count`. The clause has to know which `plural_block` inside it, since `{% plural %}` is only valid after `count`. The block has to know which
form its opening block was, so `blocktransRules` builds each as a hidden rule (`_blocktrans_block`, form its opening tag was, so `blocktransRules` builds each as a hidden rule (`_blocktrans_tag`,
`_blocktrans_count_block`) and aliases both to the one visible `blocktrans_block` where the clause uses `_blocktrans_count_tag`) and aliases both to the one visible `blocktrans_tag` where the block uses
it. Their bodies are it. Their bodies are
`_translate_body`, not `template`, which is why these four clauses need no `conflicts` entry — the rule `_translate_body`, not `template`, which is why these four blocks need no `conflicts` entry — the rule
below is about a body that can itself start with `{%`. below is about a body that can itself start with `{%`.
**Every clause needs a `conflicts` entry.** The generator offers a left associativity instead; taking it is **Every block 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 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`. 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 Sharing the blocks 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 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. Giving every `{% %}` its own `_block` stops duplicating the body states in every group's inline context. Giving every `{% %}` its own `_tag`
rule shrank it again, from 1,999 states to 1,818, by the same mechanism. The group stack's tokens (see the rule shrank it again, from 1,999 states to 1,818, by the same mechanism. The group stack's tokens (see the
scanner section) cost 247, to 3,304. scanner section) cost 247, to 3,304.
@@ -177,34 +177,34 @@ whitespace first, so a pipe there must be tight. Hence `_filtered_value_spaced`
A library's tags and filters are registered in Python, so the grammar cannot know their names, their A library's tags and filters are registered in Python, so the grammar cannot know their names, their
arity, or whether a tag is a block tag. Two fallback rules accept them: arity, or whether a tag is a block tag. Two fallback rules accept them:
- `custom_tag_block` — `simpleTag($, $.identifier)`, i.e. what `simple_tag`/`inclusion_tag` accept, which is how - `custom_tag` — `simpleTag($, $.identifier)`, i.e. what `simple_tag`/`inclusion_tag` accept, which is how
a tag is registered unless it needs the parser itself. a tag is registered unless it needs the parser itself.
- `_custom_filter`, the last alternative of `filter`, whose name is `$.identifier` rather than one of the - `_custom_filter`, the last alternative of `filter`, whose name is `$.identifier` rather than one of the
builtin literals. Hidden, so the tree is what an inline alternative would give, but named so that a builtin literals. Hidden, so the tree is what an inline alternative would give, but named so that a
grammar extending this one can filter it out of `filter`'s `members` the way it can `custom_tag_block` — see grammar extending this one can filter it out of `filter`'s `members` the way it can `custom_tag` — see
the extension section in `README.md`. the extension section in `README.md`.
**A name that only exists inside a tag group has to be reserved instead.** `endif`, `else`, `empty` and **A name that only exists inside a tag group has to be reserved instead.** `endif`, `else`, `empty` and
the rest are tokens only in the state their group opens, so where a tag is named the lexer reads them as an the rest are tokens only in the state their group opens, so where a tag is named the lexer reads them as an
identifier and `custom_tag_block` takes them: `{% endif %}` on its own parsed as a tag from some library. They are identifier and `custom_tag` takes them: `{% endif %}` on its own parsed as a tag from some library. They are
listed in `NAMES_INSIDE_A_TAG_GROUP` and applied through the `tag_name` reserved context, which wraps listed in `NAMES_INSIDE_A_TAG_GROUP` and applied through the `tag_name` reserved context, which wraps
`custom_tag_block`'s name **and nothing else** — a reserved context replaces the global one inside whatever it `custom_tag`'s name **and nothing else** — a reserved context replaces the global one inside whatever it
wraps, so wrapping the whole rule would un-reserve `as` and reject `{% mytag endif %}`. Adding a tag group wraps, so wrapping the whole rule would un-reserve `as` and reject `{% mytag endif %}`. Adding a tag group
with a new part or end tag means adding its name there too. with a new part or end tag means adding its name there too.
**The same names are what `unexpected_block` accepts.** Once reserved, a group's tag written where no open **The same names are what `unexpected_tag` accepts.** Once reserved, a group's tag written where no open
group can hold it — `{% endif %}` with nothing open, `{% else %}` in a `{% for %}` — used to be an `ERROR`, group can hold it — `{% endif %}` with nothing open, `{% else %}` in a `{% for %}` — used to be an `ERROR`,
and error recovery placed it badly: every tag starts with `{%` and the read token, which the parser has and error recovery placed it badly: every tag starts with `{%` and the read token, which the parser has
already accepted when the name turns out to be wrong, so recovery rewinds to just after them and folds the already accepted when the name turns out to be wrong, so recovery rewinds to just after them and folds the
stray tag into whichever tag comes next, which then holds the `ERROR`. `unexpected_block` takes any of stray tag into whichever tag comes next, which then holds the `ERROR`. `unexpected_tag` takes any of
`NAMES_INSIDE_A_TAG_GROUP` with loose arguments, so there is nothing to recover; `prec.dynamic(-1)` keeps it `NAMES_INSIDE_A_TAG_GROUP` with loose arguments, so there is nothing to recover; `prec.dynamic(-1)` keeps it
from displacing a tag the group does take, and `queries/errors.scm` reports it as from displacing a tag the group does take, and `queries/errors.scm` reports it as
`@error.unexpected_block`. It added 31 states and no `conflicts` entry. `@error.unexpected_tag`. It added 31 states and no `conflicts` entry.
Where several tags share a name the group holds only once — `{% if %}{% else %}{% else %}{% else %}` — reading Where several tags share a name the group holds only once — `{% if %}{% else %}{% else %}{% else %}` — reading
any of them as the stray parses, so the ties are broken by dynamic precedence: `unexpected_block` is -1 when any of them as the stray parses, so the ties are broken by dynamic precedence: `unexpected_tag` is -1 when
`_group_held` confirms the innermost group already holds the name and -2 otherwise, so each tag flagged `_group_held` confirms the innermost group already holds the name and -2 otherwise, so each tag flagged
before its time costs one more, and the first stays the clause however many follow. before its time costs one more, and the first still opens the block however many follow.
**Builtin names must stay keyword-extractable, or the fallbacks swallow them.** `word: $.identifier` turns **Builtin names must stay keyword-extractable, or the fallbacks swallow them.** `word: $.identifier` turns
each builtin's name into its own token, which the lexer prefers wherever it is valid, so a builtin commits each builtin's name into its own token, which the lexer prefers wherever it is valid, so a builtin commits
@@ -235,7 +235,7 @@ no ordering predicate to express it. What such a tool needs to know about Django
A library's filters go in their own arity tables (`L10N_FILTERS_WITHOUT_ARGUMENT`, A library's filters go in their own arity tables (`L10N_FILTERS_WITHOUT_ARGUMENT`,
`TZ_FILTERS_WITH_ARGUMENT`, …) rather than into the builtin ones, so that the builtin parity check still has an exact list to compare against. `TZ_FILTERS_WITH_ARGUMENT`, …) rather than into the builtin ones, so that the builtin parity check still has an exact list to compare against.
Modelling a library name makes it keyword-extracted, so it no longer reaches `custom_tag_block`. A project that Modelling a library name makes it keyword-extracted, so it no longer reaches `custom_tag`. A project that
registers its own tag under one of these names and a different signature therefore gets a parse error. That registers its own tag under one of these names and a different signature therefore gets a parse error. That
is accepted: these names are common enough that shadowing them is the mistake. is accepted: these names are common enough that shadowing them is the mistake.
@@ -273,7 +273,7 @@ Eighteen external tokens, for the constraints a context-free grammar cannot expr
reads the tag's name into `read_word`. The other four sit right before `%}` and check that it follows: reads the tag's name into `read_word`. The other four sit right before `%}` and check that it follows:
push opens a group expecting `"end"` + `read_word` (every Django end tag is spelled that way), follow push opens a group expecting `"end"` + `read_word` (every Django end tag is spelled that way), follow
records a middle tag the innermost group may hold only once, repeat records nothing, and close pops the records a middle tag the innermost group may hold only once, repeat records nothing, and close pops the
innermost group once `read_word` is what it expects. `_group_held` belongs to `unexpected_block` (see the load section) and returns only when innermost group once `read_word` is what it expects. `_group_held` belongs to `unexpected_tag` (see the load section) and returns only when
the innermost group already holds a tag named `read_word`. Reading `count` (`_bt_option`) marks the group about the innermost group already holds a tag named `read_word`. Reading `count` (`_bt_option`) marks the group about
to be pushed as waiting for `plural`, which its follow clears. An entry is to be pushed as waiting for `plural`, which its follow clears. An entry is
`{expected, name, middles, awaits_plural}`, serialized as `expected:name:middles:flag` and a newline per `{expected, name, middles, awaits_plural}`, serialized as `expected:name:middles:flag` and a newline per
@@ -281,12 +281,12 @@ Eighteen external tokens, for the constraints a context-free grammar cannot expr
the error state rather than overrun it. Push and follow before `%}` cost 247 states over the table-driven the error state rather than overrun it. Push and follow before `%}` cost 247 states over the table-driven
scanner (3,057 to 3,304), because argument-final states stop being shared with tags where the token is not scanner (3,057 to 3,304), because argument-final states stop being shared with tags where the token is not
valid; after `%}`, where each tag's states are its own, saved only 15. valid; after `%}`, where each tag's states are its own, saved only 15.
- `_missing_block` — the marker where a group's required tag block is missing, aliased at each use to - `_missing_tag` — the marker where a group's required tag block is missing, aliased at each use to
`missing_endX_block` or `missing_plural_block` (`MISSING_BLOCKS`). It is placed only at the end of input; `missing_endX_tag` or `missing_plural_tag` (`MISSING_TAGS`). It is placed only at the end of input;
before the end tag of a group enclosing the innermost one; before an `endblock`/`endpartialdef` naming a before the end tag of a group enclosing the innermost one; before an `endblock`/`endpartialdef` naming a
block further out; or before a second `plural`, since a blocktranslate body holds no tag that could take it. block further out; or before a second `plural`, since a blocktranslate body holds no tag that could take it.
Any other tag is taken to be the innermost group's, as Django's parser takes it — a middle tag it has not Any other tag is taken to be the innermost group's, as Django's parser takes it — a middle tag it has not
held yet, and a second of one it holds only once, which is an `unexpected_block` inside it. Marking the held yet, and a second of one it holds only once, which is an `unexpected_tag` inside it. Marking the
group closed before a second `else` was tried and dropped: inside `{% block %}`, where most template code group closed before a second `else` was tried and dropped: inside `{% block %}`, where most template code
sits, there is always an enclosing group to hand the `else` to, so the inner group's own end tag became a sits, there is always an enclosing group to hand the `else` to, so the inner group's own end tag became a
stray instead. A counted blocktranslate is missing its stray instead. A counted blocktranslate is missing its
@@ -330,7 +330,7 @@ Zero-width guards carry one hazard: `recover_with_missing` can supply one withou
during tree-sitter's mark-everything-valid recovery pass, so new guards go **below** it — and above the during tree-sitter's mark-everything-valid recovery pass, so new guards go **below** it — and above the
whitespace loop, which skips the separator the grammar still has to match. A guard must also never be valid whitespace loop, which skips the separator the grammar still has to match. A guard must also never be valid
where `content` is: a zero-width token at a content boundary preempts the internal lexer and `content` stops where `content` is: a zero-width token at a content boundary preempts the internal lexer and `content` stops
matching. `_missing_block` is the one exception, and is safe only because it returns a token solely at the end matching. `_missing_tag` is the one exception, and is safe only because it returns a token solely at the end
of input or at `{%`, where `content` cannot match. It is scanned above the raw-text scanners, which find of input or at `{%`, where `content` cannot match. It is scanned above the raw-text scanners, which find
nothing at the end of an empty body. nothing at the end of an empty body.
@@ -343,13 +343,13 @@ got the right markers. Junk inside an end tag does leave the whole file an `ERRO
`queries/highlights.scm` lists tag and filter names explicitly, so adding either to the grammar means `queries/highlights.scm` lists tag and filter names explicitly, so adding either to the grammar means
adding it there too; filter names appear there without their colon. A name the grammar does not know is adding it there too; filter names appear there without their colon. A name the grammar does not know is
captured through its field instead (`(filter name: (identifier))`, `(custom_tag_block tag: (identifier))`). captured through its field instead (`(filter filter_name: (identifier))`, `(custom_tag tag_name: (identifier))`).
`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. `{% blocktranslate %}`'s `asvar` 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: target carries an `asvar:` field instead, because it is written inside the tag but assigned outside it:
the scope on `blocktrans_clause` / `blocktranslate_clause` confines the `with` and `count` bindings, and would swallow `asvar` the scope on `blocktrans_block` / `blocktranslate_block` confines the `with` and `count` bindings, and would swallow `asvar`
too if it were spelled the same way. `queries/exports.scm` names it for a tool to too if it were spelled the same way. `queries/exports.scm` names it for a tool to
bind in the scope around the block, which a locals query cannot do: it places a definition in the innermost bind in the scope around the block, which a locals query cannot do: it places a definition in the innermost
scope containing it and offers no way out again. scope containing it and offers no way out again.
@@ -359,16 +359,16 @@ scope containing it and offers no way out again.
`{% if a %}{% now "Y" as n %}{% endif %}{{ n }}` may reach `{{ n }}` with nothing bound. A locals query `{% if a %}{% now "Y" as n %}{% endif %}{{ n }}` may reach `{{ n }}` with nothing bound. A locals query
cannot: it matches a reference to the definition whose scope contains it and has no notion of a path not cannot: it matches a reference to the definition whose scope contains it and has no notion of a path not
taken. A group is exhaustive iff it has a `@conditional.default`, so each pattern captures the group taken. A group is exhaustive iff it has a `@conditional.default`, so each pattern captures the group
alongside one of its parts and a tool needs no list of which clause belongs to which group. Adding a tag alongside one of its parts and a tool needs no list of which block belongs to which group. Adding a tag
group whose body may be skipped means adding it there — `{% cache %}` is the non-obvious one, since a group whose body may be skipped means adding it there — `{% cache %}` is the non-obvious one, since a
cache hit skips the body outright and `CacheNode` pushes no context. cache hit skips the body outright and `CacheNode` pushes no context.
A branch that is also a `@local.scope` confines its bindings whichever way the branch goes, which is why A branch that is also a `@local.scope` confines its bindings whichever way the branch goes, which is why
`{% for %}` is inert for that check: `ForNode` renders `nodelist_empty` **inside** the same `{% for %}` is inert for that check: `ForNode` renders `nodelist_empty` **inside** the same
`context.push()` as the loop body, so `empty_clause` is a scope alongside `for_clause`. `context.push()` as the loop body, so `empty_block` is a scope alongside `for_block`.
`queries/errors.scm` collects what an editor should report: `(ERROR)` as `@error.syntax`, `(MISSING)` as `queries/errors.scm` collects what an editor should report: `(ERROR)` as `@error.syntax`, `(MISSING)` as
`@error.missing`, and every missing-tag marker as `@error.missing_block`. A tree holding only markers has `@error.missing`, and every missing-tag marker as `@error.missing_tag`. A tree holding only markers has
no `has_error`, so a tool that checks that flag alone misses them. Adding a tag group means adding its no `has_error`, so a tool that checks that flag alone misses them. Adding a tag group means adding its
marker there, since no supertype matches them all. marker there, since no supertype matches them all.
@@ -428,8 +428,8 @@ unavoidable limitation, or a case where this grammar is the more permissive one
- `{% csp_nonce_attr "a" media="b" %}` is accepted, matching Django, which only rejects it at render time. - `{% csp_nonce_attr "a" media="b" %}` is accepted, matching Django, which only rejects it at render time.
- A misspelled tag or filter cannot be caught: `{{ x|lenght }}` is indistinguishable from a filter some - A misspelled tag or filter cannot be caught: `{{ x|lenght }}` is indistinguishable from a filter some
library registered. Cross-referencing names against `{% load %}` needs the project's Python, so it library registered. Cross-referencing names against `{% load %}` needs the project's Python, so it
belongs in a linter; the `load_block` rule already parses the library and `from` names for one to use. belongs in a linter; the `load_tag` rule already parses the library and `from` names for one to use.
- `{% mytag %}…{% endmytag %}` parses as two sibling `custom_tag_block`s. Nesting them would mean guessing that - `{% mytag %}…{% endmytag %}` parses as two sibling `custom_tag`s. Nesting them would mean guessing that
an unknown tag is a block tag. an unknown tag is a block tag.
- A custom tag's contents are only assumed to be the `simple_tag` shape. `@register.tag` receives the raw - A custom tag's contents are only assumed to be the `simple_tag` shape. `@register.tag` receives the raw
token and may parse anything, so `{% mytag <<>> %}` is rejected here and not by Django. token and may parse anything, so `{% mytag <<>> %}` is rejected here and not by Django.
@@ -447,6 +447,6 @@ unavoidable limitation, or a case where this grammar is the more permissive one
- `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
their enclosing tag rather than as separate tags. their enclosing tag rather than as separate tags.
- An unterminated group parses here and raises `TemplateSyntaxError` in Django: `{% if a %}x`, or a - An unterminated group parses here and raises `TemplateSyntaxError` in Django: `{% if a %}x`, or a
`{% for %}` closed while an `{% if %}` inside it is still open, holds a `missing_endif_block` marker `{% for %}` closed while an `{% if %}` inside it is still open, holds a `missing_endif_tag` marker
where the end tag belongs. The marker is the error, reported through `queries/errors.scm`; a check where the end tag belongs. The marker is the error, reported through `queries/errors.scm`; a check
for `ERROR` nodes alone accepts the tree. for `ERROR` nodes alone accepts the tree.
+44 -48
View File
@@ -53,7 +53,7 @@ Five of the files in `queries/` are query files an editor loads:
- **`highlights.scm`** — syntax highlighting. Tag and filter names are listed one by one, so a name the - **`highlights.scm`** — syntax highlighting. Tag and filter names are listed one by one, so a name the
grammar knows is captured as `@function` and a name it is only tolerating as `@function.call`. grammar knows is captured as `@function` and a name it is only tolerating as `@function.call`.
- **`locals.scm`** — scopes, definitions and references, so an editor can resolve a variable to the tag - **`locals.scm`** — scopes, definitions and references, so an editor can resolve a variable to the tag
that bound it. A definition is a `variable:` field; the scopes are the clauses whose bindings do not that bound it. A definition is a `variable:` field; the scopes are the blocks whose bindings do not
outlive them (`{% with %}`, `{% for %}`, `{% empty %}`, `{% block %}`, `{% partialdef %}`, outlive them (`{% with %}`, `{% for %}`, `{% empty %}`, `{% block %}`, `{% partialdef %}`,
`{% blocktranslate %}`). `{% blocktranslate %}`).
- **`tags.scm`** — the symbol index behind `tree-sitter tag`. A `{% partialdef %}` and the names a - **`tags.scm`** — the symbol index behind `tree-sitter tag`. A `{% partialdef %}` and the names a
@@ -62,14 +62,14 @@ Five of the files in `queries/` are query files an editor loads:
the HTML around the tags can be parsed by its own grammar. It names no language, leaving the editor to the HTML around the tags can be parsed by its own grammar. It names no language, leaving the editor to
supply one. supply one.
- **`errors.scm`** — what to report as a problem: `(ERROR)` as `@error.syntax`, tree-sitter's own - **`errors.scm`** — what to report as a problem: `(ERROR)` as `@error.syntax`, tree-sitter's own
`(MISSING)` as `@error.missing`, and `@error.missing_block` for the marker placed where a group's required `(MISSING)` as `@error.missing`, and `@error.missing_tag` for the marker placed where a group's required
tag is missing. An unterminated `{% if a %}x` parses as an `if_group` ending in a zero-width tag is missing. An unterminated `{% if a %}x` parses as an `if_group` ending in a zero-width
`missing_endif_block` rather than as an `ERROR`, so completion and the scope queries keep working while `missing_endif_tag` rather than as an `ERROR`, so completion and the scope queries keep working while
a template is being written — and the tree reports no error of its own, so this query is how to find a template is being written — and the tree reports no error of its own, so this query is how to find
it. A marker is placed only where the scanner can tell: at the end of input, before an end tag that it. A marker is placed only where the scanner can tell: at the end of input, before an end tag that
belongs to an enclosing group, or before an `{% endblock %}` naming a block further out. belongs to an enclosing group, or before an `{% endblock %}` naming a block further out.
A group's tag written where no open group can hold it, such as `{% else %}` inside a `{% for %}`, is an A group's tag written where no open group can hold it, such as `{% else %}` inside a `{% for %}`, is an
`unexpected_block`, captured as `@error.unexpected_block`. `unexpected_tag`, captured as `@error.unexpected_tag`.
The other three are data for a tool rather than queries an editor runs. Each captures the two halves of a The other three are data for a tool rather than queries an editor runs. Each captures the two halves of a
relation a tree-sitter query cannot express, and the tool does the join: relation a tree-sitter query cannot express, and the tool does the join:
@@ -119,11 +119,11 @@ them is treated as the mistake.
A library's tags and filters are registered in Python, so the grammar cannot know their names, their A library's tags and filters are registered in Python, so the grammar cannot know their names, their
arity, or whether a tag opens a body. Two fallback rules accept them: arity, or whether a tag opens a body. Two fallback rules accept them:
- **Tags.** Any tag the grammar does not recognise parses as `custom_tag_block`, with the shape `simple_tag` and - **Tags.** Any tag the grammar does not recognise parses as `custom_tag`, with the shape `simple_tag` and
`inclusion_tag` give: positional filter expressions, then `name=value` keyword arguments, then an `inclusion_tag` give: positional filter expressions, then `name=value` keyword arguments, then an
optional `as name`. So `{% mytag a b|upper "s" k=1 as out %}` parses, with the name on the `tag:` field. optional `as name`. So `{% mytag a b|upper "s" k=1 as out %}` parses, with the name on the `tag_name:` field.
A keyword argument written twice is refused, as `parse_bits` refuses it. A keyword argument written twice is refused, as `parse_bits` refuses it.
- **Filters.** An unknown filter parses as `(filter name: (identifier))` with at most one `:argument`, - **Filters.** An unknown filter parses as `(filter filter_name: (identifier))` with at most one `:argument`,
which is all Django's expression regex allows. No arity check is possible. which is all Django's expression regex allows. No arity check is possible.
Both are captured as `@function.call` rather than `@function`, so an editor can distinguish a name the Both are captured as `@function.call` rather than `@function`, so an editor can distinguish a name the
@@ -131,21 +131,21 @@ grammar knows from one it is only tolerating.
What the fallbacks cannot do: What the fallbacks cannot do:
- **A block tag is not nested.** `{% mytag %}…{% endmytag %}` is two sibling `custom_tag_block`s; pairing them - **A block tag is not nested.** `{% mytag %}…{% endmytag %}` is two sibling `custom_tag`s; pairing them
would mean guessing that an unknown tag opens a body. would mean guessing that an unknown tag opens a body.
- **A tag registered with `@register.tag` may parse anything**, since it receives the raw token, so one - **A tag registered with `@register.tag` may parse anything**, since it receives the raw token, so one
whose arguments are not the `simple_tag` shape — `{% mytag <<>> %}` — is an error here and not in Django. whose arguments are not the `simple_tag` shape — `{% mytag <<>> %}` — is an error here and not in Django.
- **A misspelled name cannot be caught.** `{{ x|lenght }}` is indistinguishable from a filter some library - **A misspelled name cannot be caught.** `{{ x|lenght }}` is indistinguishable from a filter some library
registered. Cross-referencing names against `{% load %}` needs the project's Python, so it belongs in a registered. Cross-referencing names against `{% load %}` needs the project's Python, so it belongs in a
linter; `queries/libraries.scm` and the `load_block` rule supply what one needs. linter; `queries/libraries.scm` and the `load_tag` rule supply what one needs.
- **Names that only exist inside a tag group are reserved**, so `{% endif %}` or `{% empty %}` standing on - **Names that only exist inside a tag group are reserved**, so `{% endif %}` or `{% empty %}` standing on
its own is an `unexpected_block`, reported by `errors.scm`, rather than a call to a custom tag of that name. its own is an `unexpected_tag`, reported by `errors.scm`, rather than a call to a custom tag of that name.
### Adding rules for your own tags and filters ### Adding rules for your own tags and filters
For a project whose custom tags deserve real rules rather than the fallbacks, use this grammar as a base For a project whose custom tags deserve real rules rather than the fallbacks, use this grammar as a base
grammar. `grammar(base, {...})` merges your rules into it, and a rule that redefines one the base already grammar. `grammar(base, {...})` merges your rules into it, and a rule that redefines one the base already
has receives it as `previous`. A tag is an alternative of `tag_block_group`; a filter is an has receives it as `previous`. A tag is an alternative of `template_tag`; a filter is an
alternative of `filter`. alternative of `filter`.
```js ```js
@@ -154,16 +154,15 @@ import django from "tree-sitter-django/grammar";
export default grammar(django, { export default grammar(django, {
name: "djangox", name: "djangox",
conflicts: ($, previous) => [...previous, [$.loop_clause]], conflicts: ($, previous) => [...previous, [$.loop_block]],
rules: { rules: {
tag_block_group: ($, previous) => template_tag: ($, previous) => choice(previous, $.map_tag, $.loop_group),
choice(previous, $.map_block, $.loop_group),
// {% map items over rows %} // {% map items over rows %}
map_block: ($) => map_tag: ($) =>
seq( seq(
$.simpleBlockOpen, $.simpleTagOpen,
field("tag", "map"), field("tag", "map"),
$._sep, $._sep,
$.filtered_value, $.filtered_value,
@@ -171,28 +170,25 @@ export default grammar(django, {
"over", "over",
$._sep, $._sep,
$.filtered_value, $.filtered_value,
$.simpleBlockClose, $.simpleTagClose,
), ),
// {% loop x %}…{% endloop %} // {% loop x %}…{% endloop %}
loop_block: ($) => loop_tag: ($) =>
seq( seq(
$.startBlockOpen, $.startTagOpen,
field("tag", "loop"), field("tag", "loop"),
$._sep, $._sep,
$.identifier, $.identifier,
$.startBlockClose, $.startTagClose,
), ),
loop_clause: ($) => seq($.loop_block, optional($.template)), loop_block: ($) => seq($.loop_tag, optional($.template)),
endloop_block: ($) => endloop_tag: ($) =>
seq($.endBlockOpen, field("tag", "endloop"), $.endBlockClose), seq($.endTagOpen, field("tag", "endloop"), $.endTagClose),
loop_group: ($) => loop_group: ($) =>
seq( seq(
$.loop_clause, $.loop_block,
choice( choice($.endloop_tag, alias($._missing_tag, $.missing_endloop_tag)),
$.endloop_block,
alias($._missing_block, $.missing_endloop_block),
),
), ),
// {{ value|shout:"!" }} // {{ value|shout:"!" }}
@@ -208,31 +204,31 @@ export default grammar(django, {
Seven things to know: Seven things to know:
- **Whitespace is explicit.** `extras` is empty, because Django splits a tag's contents before parsing any - **Whitespace is explicit.** `extras` is empty, because Django splits a tag's contents before parsing any
argument, so every separator has to be written out. The `part`/`block`/`simpleTag` helpers the base argument, so every separator has to be written out. The `part`/`tag`/`simpleTag` helpers the base
grammar is built from are private to it, but the separator is the hidden rule `$._sep`, and it and the grammar is built from are private to it, but the separator is the hidden rule `$._sep`, and it and the
tag utilities (`simpleBlockOpen` and the rest) are rules, so an extending grammar uses them as they are. tag utilities (`simpleTagOpen` and the rest) are rules, so an extending grammar uses them as they are.
- **Every tag begins with one of the opens**: `$.simpleBlockOpen`, with `$.simpleBlockClose` at its end, for a - **Every tag begins with one of the opens**: `$.simpleTagOpen`, with `$.simpleTagClose` at its end, for a
tag outside any group such as `map_block`, and `startBlockOpen`, `followBlockOpen`, `repeatBlockOpen` or tag outside any group such as `map_tag`, and `startTagOpen`, `followTagOpen`, `repeatTagOpen` or
`endBlockOpen` for the tags of a group. Its `endTagOpen` for the tags of a group. Its
zero-width token hands the tag's name to the scanner and is taken wherever a tag can start, so a tag zero-width token hands the tag's name to the scanner and is taken wherever a tag can start, so a tag
written from a bare `"{%"` never matches: `{% map items over rows %}` would quietly parse as a written from a bare `"{%"` never matches: `{% map items over rows %}` would quietly parse as a
`custom_tag_block` instead. `custom_tag` instead.
- **A new name wins over the fallback.** `shout` becomes a token of its own, so it commits to your - **A new name wins over the fallback.** `shout` becomes a token of its own, so it commits to your
alternative and your arity applies — `{{ x|shout }}` is now an error, while names you have not modelled alternative and your arity applies — `{{ x|shout }}` is now an error, while names you have not modelled
still fall through to `(filter name: (identifier))`. still fall through to `(filter filter_name: (identifier))`.
- **A tag with a body is split the way the base grammar's are**, so every `{% %}` is a node of its own: - **A tag with a body is split the way the base grammar's are**, so every `{% %}` is a node of its own:
a `loop_block` ending in `$.startBlockClose`, a `loop_clause` of that block and the body, an a `loop_tag` ending in `$.startTagClose`, a `loop_block` of that tag and the body, an
`endloop_block` built from `$.endBlockOpen` and `$.endBlockClose`, and a `loop_group` of the clause and the `endloop_tag` built from `$.endTagOpen` and `$.endTagClose`, and a `loop_group` of the block and the
end block. A middle tag uses `followBlockOpen`/`followBlockClose` if the group holds it at most once, and end tag. A middle tag uses `followTagOpen`/`followTagClose` if the group holds it at most once, and
`repeatBlockOpen`/`repeatBlockClose` if it may repeat; the scanner trusts that choice. The clause needs a `repeatTagOpen`/`repeatTagClose` if it may repeat; the scanner trusts that choice. The block needs a
`conflicts` entry, as every clause in the base grammar does. The generator offers an associativity `conflicts` entry, as every block in the base grammar does. The generator offers an associativity
instead; taking it silently discards the parse in which the body continues. instead; taking it silently discards the parse in which the body continues.
- **End tags are not reserved**, a stray `{% endmap %}` parses as a `custom_tag_block` rather than an error — `reserved` takes no - **End tags are not reserved**, a stray `{% endmap %}` parses as a `custom_tag` rather than an error — `reserved` takes no
`previous`, so the `tag_name` list cannot be added to a name at a time. Instead you may drop the `custom_tag_block` rule to avoid parsing end tags as custom tags. `previous`, so the `tag_name` list cannot be added to a name at a time. Instead you may drop the `custom_tag` rule to avoid parsing end tags as custom tags.
- **Your groups get missing-tag markers.** The scanner knows no group by name — a group is closed by `end` - **Your groups get missing-tag markers.** The scanner knows no group by name — a group is closed by `end`
followed by its opening tag's name — so the `alias($._missing_block, $.missing_endloop_block)` choice followed by its opening tag's name — so the `alias($._missing_tag, $.missing_endloop_tag)` choice
above is all it takes: an unclosed `{% loop x %}`, or one left open inside an `{% if %}` that above is all it takes: an unclosed `{% loop x %}`, or one left open inside an `{% if %}` that
`{% endif %}` closes, holds a `missing_endloop_block`. Add the name to your copy of `errors.scm`. `{% endif %}` closes, holds a `missing_endloop_tag`. Add the name to your copy of `errors.scm`.
- **The external scanner has to be re-exported under your grammar's name**, or block-name matching and the - **The external scanner has to be re-exported under your grammar's name**, or block-name matching and the
repeated-argument guards will not link. Give your grammar a `src/scanner.c` that renames the base's five entry points to the repeated-argument guards will not link. Give your grammar a `src/scanner.c` that renames the base's five entry points to the
ones your generated `parser.c` calls, and includes it: ones your generated `parser.c` calls, and includes it:
@@ -254,13 +250,13 @@ build step can hand the compiler an absolute path from `import.meta.resolve` whe
layout makes the relative one unreliable. layout makes the relative one unreliable.
**Turning the fallbacks off.** A grammar that models every tag and filter its project uses probably does **Turning the fallbacks off.** A grammar that models every tag and filter its project uses probably does
not want `custom_tag_block` and `_custom_filter` accepting unrecognized names as they allow typos to parse. `previous` is the base rule whose `members` are filterable. We can filter out these rules to make the grammar more strict: not want `custom_tag` and `_custom_filter` accepting unrecognized names as they allow typos to parse. `previous` is the base rule whose `members` are filterable. We can filter out these rules to make the grammar more strict:
```js ```js
tag_block_group: ($, previous) => template_tag: ($, previous) =>
choice( choice(
...previous.members.filter((m) => m.name !== "custom_tag_block"), ...previous.members.filter((m) => m.name !== "custom_tag"),
$.map_block, $.map_tag,
), ),
filter: ($, previous) => filter: ($, previous) =>
+315 -338
View File
File diff suppressed because it is too large. Load diff
+10 -10
View File
@@ -22,7 +22,7 @@
; If it is not, some pass through it binds nothing, so every definition inside ; If it is not, some pass through it binds nothing, so every definition inside
; is conditional. If it is, a definition escapes only when every branch makes ; is conditional. If it is, a definition escapes only when every branch makes
; it. Each capture names both halves of the pair, so no ancestor walk is needed ; it. Each capture names both halves of the pair, so no ancestor walk is needed
; and no clause has to be attributed to a group by name. ; and no block has to be attributed to a group by name.
; ;
; Branches nest, so the same test applies again to a group inside a branch. ; Branches nest, so the same test applies again to a group inside a branch.
; ;
@@ -34,20 +34,20 @@
; of the three pushes a context, so this is the case the check exists for. ; of the three pushes a context, so this is the case the check exists for.
(if_group (if_group
[ [
(if_clause) (if_block)
(elif_clause) (elif_block)
] @conditional.branch) @conditional.group ] @conditional.branch) @conditional.group
(if_group (if_group
(else_clause) @conditional.default) @conditional.group (else_block) @conditional.default) @conditional.group
; ifchanged renders its body only when the watched value differs from the ; ifchanged renders its body only when the watched value differs from the
; previous pass, and its else otherwise. It pushes no context either. ; previous pass, and its else otherwise. It pushes no context either.
(ifchanged_group (ifchanged_group
(ifchanged_clause) @conditional.branch) @conditional.group (ifchanged_block) @conditional.branch) @conditional.group
(ifchanged_group (ifchanged_group
(else_clause) @conditional.default) @conditional.group (else_block) @conditional.default) @conditional.group
; The loop body runs once per item and empty runs when there are none, so the ; The loop body runs once per item and empty runs when there are none, so the
; two partition every render. Both are inside ForNode's context.push() — the ; two partition every render. Both are inside ForNode's context.push() — the
@@ -55,21 +55,21 @@
; nothing escapes either way. Named here because the construct does branch, and ; nothing escapes either way. Named here because the construct does branch, and
; because a tool reading only this file should not have to infer that it does. ; because a tool reading only this file should not have to infer that it does.
(for_group (for_group
(for_clause) @conditional.branch) @conditional.group (for_block) @conditional.branch) @conditional.group
(for_group (for_group
(empty_clause) @conditional.default) @conditional.group (empty_block) @conditional.default) @conditional.group
; A cache body is skipped entirely on a cache hit, and CacheNode pushes no ; A cache body is skipped entirely on a cache hit, and CacheNode pushes no
; context, so a binding made inside it reaches the rest of the template on the ; context, so a binding made inside it reaches the rest of the template on the
; first render and is gone on the next. One branch and no default: never ; first render and is gone on the next. One branch and no default: never
; exhaustive, which is the right answer. ; exhaustive, which is the right answer.
(cache_group (cache_group
(cache_clause) @conditional.branch) @conditional.group (cache_block) @conditional.branch) @conditional.group
; Not here, deliberately: block and partialdef bodies may also fail to render — ; Not here, deliberately: block and partialdef bodies may also fail to render —
; a child template overrides the block, and a partial renders only where ; a child template overrides the block, and a partial renders only where
; {% partial %} names it — but both clauses are @local.scope in locals.scm, so ; {% partial %} names it — but both blocks are @local.scope in locals.scm, so
; nothing they bind escapes to be checked. Bodies that always render once ; nothing they bind escapes to be checked. Bodies that always render once
; (with, filter, autoescape, spaceless, language, localize, localtime, ; (with, filter, autoescape, spaceless, language, localize, localtime,
; timezone) are not conditional at all, and comment, verbatim and ; timezone) are not conditional at all, and comment, verbatim and
+23 -23
View File
@@ -1,16 +1,16 @@
; Everything in a template that an editor should report as a problem. ; Everything in a template that an editor should report as a problem.
; ;
; A group whose required tag is missing parses without an ERROR: the scanner ; A group whose required tag is missing parses without an ERROR: the scanner
; supplies a zero-width marker where the tag belongs, so the group, its clauses ; supplies a zero-width marker where the tag belongs, so the group, its blocks
; and the scopes they open stay intact for completion and the other queries. ; and the scopes they open stay intact for completion and the other queries.
; Such a tree has no error of its own (ts_node_has_error is false), so a tool ; Such a tree has no error of its own (ts_node_has_error is false), so a tool
; has to run this query to find them. ; has to run this query to find them.
; ;
; @error.syntax input the grammar could not parse ; @error.syntax input the grammar could not parse
; @error.missing a token that tree-sitter's error recovery inserted ; @error.missing a token that tree-sitter's error recovery inserted
; @error.missing_block expected tag block is missing ; @error.missing_tag expected tag block is missing
; ;
; The markers are listed one by one, as MISSING_BLOCKS in grammar.js: the ; The markers are listed one by one, as MISSING_TAGS in grammar.js: the
; generator drops a supertype whose members are aliases, so there is no single ; generator drops a supertype whose members are aliases, so there is no single
; node type to match them all. A new tag group, or a new kind of marker, is ; node type to match them all. A new tag group, or a new kind of marker, is
; added here. ; added here.
@@ -20,24 +20,24 @@
(MISSING) @error.missing (MISSING) @error.missing
[ [
(missing_endautoescape_block) (missing_endautoescape_tag)
(missing_endblock_block) (missing_endblock_tag)
(missing_endblocktrans_block) (missing_endblocktrans_tag)
(missing_endblocktranslate_block) (missing_endblocktranslate_tag)
(missing_endcache_block) (missing_endcache_tag)
(missing_endcomment_block) (missing_endcomment_tag)
(missing_endfilter_block) (missing_endfilter_tag)
(missing_endfor_block) (missing_endfor_tag)
(missing_endif_block) (missing_endif_tag)
(missing_endifchanged_block) (missing_endifchanged_tag)
(missing_endlanguage_block) (missing_endlanguage_tag)
(missing_endlocalize_block) (missing_endlocalize_tag)
(missing_endlocaltime_block) (missing_endlocaltime_tag)
(missing_endpartialdef_block) (missing_endpartialdef_tag)
(missing_endspaceless_block) (missing_endspaceless_tag)
(missing_endtimezone_block) (missing_endtimezone_tag)
(missing_endverbatim_block) (missing_endverbatim_tag)
(missing_endwith_block) (missing_endwith_tag)
(missing_plural_block)] @error.missing_block (missing_plural_tag)] @error.missing_tag
(unexpected_block) @error.unexpected_block (unexpected_tag) @error.unexpected_tag
+2 -2
View File
@@ -21,10 +21,10 @@
; scope span could have separated them; that is why this is a separate file ; scope span could have separated them; that is why this is a separate file
; rather than a narrower scope in locals.scm. ; rather than a narrower scope in locals.scm.
(blocktrans_clause
(blocktrans_block (blocktrans_block
(blocktrans_tag
asvar: (identifier) @export.name)) @export.from asvar: (identifier) @export.name)) @export.from
(blocktranslate_clause
(blocktranslate_block (blocktranslate_block
(blocktranslate_tag
asvar: (identifier) @export.name)) @export.from asvar: (identifier) @export.name)) @export.from
+9 -9
View File
@@ -4,13 +4,13 @@
variable: (identifier) @variable.parameter variable: (identifier) @variable.parameter
(block_block (block_tag
(push_block) @type) (push_block) @type)
(partialdef_block (partialdef_tag
(push_partial) @type) (push_partial) @type)
(verbatim_block (verbatim_tag
(push_verbatim) @type) (push_verbatim) @type)
(comment_content) @comment (comment_content) @comment
@@ -47,7 +47,7 @@ variable: (identifier) @variable.parameter
(library (library
(identifier) @module) (identifier) @module)
tag: [ tag_name: [
("autoescape") ("autoescape")
("endautoescape") ("endautoescape")
("block") ("block")
@@ -120,7 +120,7 @@ tag: [
("endwith")] @function ("endwith")] @function
(filter (filter
name: [ filter_name: [
("add") ("add")
("addslashes") ("addslashes")
("capfirst") ("capfirst")
@@ -190,10 +190,10 @@ tag: [
; a filter or tag a "load" brought in, whose name the grammar does not know ; a filter or tag a "load" brought in, whose name the grammar does not know
(filter (filter
name: (identifier) @function.call) filter_name: (identifier) @function.call)
(custom_tag_block (custom_tag
tag: (identifier) @function.call) tag_name: (identifier) @function.call)
(load_block (load_tag
(identifier) @function) (identifier) @function)
+39 -39
View File
@@ -15,81 +15,81 @@
; heads, so that the capture is both the name to look up and the range to ; heads, so that the capture is both the name to look up and the range to
; report. A paired tag names the opening tag only. ; report. A paired tag names the opening tag only.
(static_block (static_tag
tag: ("static") @library.static) tag_name: ("static") @library.static)
(get_static_prefix_block (get_static_prefix_tag
tag: ("get_static_prefix") @library.static) tag_name: ("get_static_prefix") @library.static)
(get_media_prefix_block (get_media_prefix_tag
tag: ("get_media_prefix") @library.static) tag_name: ("get_media_prefix") @library.static)
(blocktrans_block (blocktrans_tag
tag: ("blocktrans") @library.i18n) tag_name: ("blocktrans") @library.i18n)
(blocktranslate_block (blocktranslate_tag
tag: ("blocktranslate") @library.i18n) tag_name: ("blocktranslate") @library.i18n)
(translate_block (translate_tag
tag: [ tag_name: [
("trans") ("trans")
("translate")] @library.i18n) ("translate")] @library.i18n)
(language_block (language_tag
tag: ("language") @library.i18n) tag_name: ("language") @library.i18n)
(get_available_languages_block (get_available_languages_tag
tag: ("get_available_languages") @library.i18n) tag_name: ("get_available_languages") @library.i18n)
(get_current_language_block (get_current_language_tag
tag: ("get_current_language") @library.i18n) tag_name: ("get_current_language") @library.i18n)
(get_current_language_bidi_block (get_current_language_bidi_tag
tag: ("get_current_language_bidi") @library.i18n) tag_name: ("get_current_language_bidi") @library.i18n)
(get_language_info_block (get_language_info_tag
tag: ("get_language_info") @library.i18n) tag_name: ("get_language_info") @library.i18n)
(get_language_info_list_block (get_language_info_list_tag
tag: ("get_language_info_list") @library.i18n) tag_name: ("get_language_info_list") @library.i18n)
(filter (filter
name: [ filter_name: [
("language_bidi") ("language_bidi")
("language_name") ("language_name")
("language_name_local") ("language_name_local")
("language_name_translated")] @library.i18n) ("language_name_translated")] @library.i18n)
(cache_block (cache_tag
tag: ("cache") @library.cache) tag_name: ("cache") @library.cache)
(localize_block (localize_tag
tag: ("localize") @library.l10n) tag_name: ("localize") @library.l10n)
(filter (filter
name: [ filter_name: [
("localize") ("localize")
("unlocalize")] @library.l10n) ("unlocalize")] @library.l10n)
(localtime_block (localtime_tag
tag: ("localtime") @library.tz) tag_name: ("localtime") @library.tz)
(timezone_block (timezone_tag
tag: ("timezone") @library.tz) tag_name: ("timezone") @library.tz)
(get_current_timezone_block (get_current_timezone_tag
tag: ("get_current_timezone") @library.tz) tag_name: ("get_current_timezone") @library.tz)
(filter (filter
name: [ filter_name: [
("localtime") ("localtime")
("timezone") ("timezone")
("utc")] @library.tz) ("utc")] @library.tz)
; "{% load static %}" makes every name in the library available; "{% load ; "{% load static %}" makes every name in the library available; "{% load
; static from staticfiles %}" makes only the names listed available. ; static from staticfiles %}" makes only the names listed available.
(load_block (load_tag
(library) @load.library) (library) @load.library)
(load_block (load_tag
(identifier) @load.name) (identifier) @load.name)
+9 -9
View File
@@ -6,22 +6,22 @@ variable: (identifier) @local.definition
; The tags whose Node pushes a context, so that what they bind is not visible ; The tags whose Node pushes a context, so that what they bind is not visible
; after them. Verified by rendering: "{% block b %}{% now "Y" as n %}{% endblock %}{{ n }}" ; 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. ; is empty, while the same around an "{% if %}" is not, because if does not push.
(with_clause) @local.scope (with_block) @local.scope
(for_clause) @local.scope (for_block) @local.scope
(block_clause) @local.scope (block_block) @local.scope
(partialdef_clause) @local.scope (partialdef_block) @local.scope
; ForNode renders nodelist_empty inside the same context.push() as the loop ; ForNode renders nodelist_empty inside the same context.push() as the loop
; body, so "{% empty %}" is part of the loop's scope even though it is a ; body, so "{% empty %}" is part of the loop's scope even though it is a
; separate clause: "{% for x in ys %}a{% empty %}{% now "Y" as n %}{% endfor %}{{ n }}" ; separate block: "{% for x in ys %}a{% empty %}{% now "Y" as n %}{% endfor %}{{ n }}"
; is empty. queries/conditionals.scm names both clauses as branches of the ; is empty. queries/conditionals.scm names both blocks as branches of the
; same group and relies on this. ; same group and relies on this.
(empty_clause) @local.scope (empty_block) @local.scope
; blocktranslate pushes a context for its "with" and "count" bindings. Its ; 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 ; 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 ; 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 ; 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. ; around the block, which a locals query has no way to say.
(blocktrans_clause) @local.scope (blocktrans_block) @local.scope
(blocktranslate_clause) @local.scope (blocktranslate_block) @local.scope
+10 -10
View File
@@ -1,20 +1,20 @@
(load_block (load_tag
(identifier) @name) @definition.function (identifier) @name) @definition.function
(partialdef_block (push_partial) @name) @definition.method (partialdef_tag (push_partial) @name) @definition.method
(partial_block (identifier) @name) @reference.call (partial_tag (identifier) @name) @reference.call
; a tag that opens no body names itself; a group is named by the first block of ; a tag that opens no body names itself; a group is named by the first tag of
; its first clause, so neither its end block nor the blocks opening its later ; its first block, so neither its end tag nor the tags opening its later blocks
; clauses are references of their own ; are references of their own
(tag_block_group (template_tag
tag: _ @name) @reference.call tag_name: _ @name) @reference.call
(tag_block_group (template_tag
. .
(_ (_
. .
(_ (_
tag: _ @name))) @reference.call tag_name: _ @name))) @reference.call
(filter) @reference.call (filter) @reference.call
+615 -615
View File
File diff suppressed because it is too large. Load diff
+838 -838
View File
File diff suppressed because it is too large. Load diff
+3681 -3679
View File
File diff suppressed because it is too large. Load diff
+16 -16
View File
@@ -39,8 +39,8 @@ enum TokenType {
* and fail if the tag has already been given one by that name */ * and fail if the tag has already been given one by that name */
KwargName, KwargName,
/* zero width, where a tag group's required tag is missing; see /* zero width, where a tag group's required tag is missing; see
* scan_missing_block */ * scan_missing_tag */
MissingBlock, MissingTag,
/* zero width, after "{%": read the tag's name */ /* zero width, after "{%": read the tag's name */
GroupOpenTagRead, GroupOpenTagRead,
/* zero width, before the "%}" of a tag that opens a group: push the group */ /* zero width, before the "%}" of a tag that opens a group: push the group */
@@ -53,7 +53,7 @@ enum TokenType {
GroupRepeat, GroupRepeat,
/* zero width, before the "%}" of a tag that closes a group: pop the group */ /* zero width, before the "%}" of a tag that closes a group: pop the group */
GroupClose, GroupClose,
/* zero width, before the "%}" of an unexpected_block: returned only when /* zero width, before the "%}" of an unexpected_tag: returned only when
* the innermost group already holds a tag by that name, which makes this the * the innermost group already holds a tag by that name, which makes this the
* likelier stray of the two */ * likelier stray of the two */
GroupHeld, GroupHeld,
@@ -469,7 +469,7 @@ static unsigned check_name(TSLexer *const lexer, const Name *const name) {
return name->size; return name->size;
} }
static bool check_close_block(TSLexer *const lexer) { static bool check_close_tag(TSLexer *const lexer) {
while (check_space(lexer->lookahead)) { while (check_space(lexer->lookahead)) {
lexer->advance(lexer, false); lexer->advance(lexer, false);
} }
@@ -481,9 +481,9 @@ static bool check_close_block(TSLexer *const lexer) {
} }
/* Marks the name just read as the token, then checks that only "%}" follows. */ /* Marks the name just read as the token, then checks that only "%}" follows. */
static bool check_close_block_from(TSLexer *const lexer) { static bool check_close_tag_from(TSLexer *const lexer) {
lexer->mark_end(lexer); lexer->mark_end(lexer);
return check_close_block(lexer); return check_close_tag(lexer);
} }
const char inline_chars[] = "inline"; const char inline_chars[] = "inline";
@@ -495,7 +495,7 @@ static bool check_inline(TSLexer *const lexer) {
} }
lexer->advance(lexer, false); lexer->advance(lexer, false);
} }
return check_close_block(lexer); return check_close_tag(lexer);
} }
static void skip_whitespace(TSLexer *const lexer) { static void skip_whitespace(TSLexer *const lexer) {
@@ -715,7 +715,7 @@ static bool scan_group_tag_end(
} else { } else {
OpenGroup *const group = array_back(&scanner->stack); OpenGroup *const group = array_back(&scanner->stack);
if (name_in_list(&scanner->read_word, &group->middles)) { if (name_in_list(&scanner->read_word, &group->middles)) {
// a second one of these parses as an unexpected_block, which has no follow // a second one of these parses as an unexpected_tag, which has no follow
lexer->log(lexer, "refused %s: the parser gives it to the innermost group, which already holds one", lexer->log(lexer, "refused %s: the parser gives it to the innermost group, which already holds one",
log_name(&scanner->read_word, buffer)); log_name(&scanner->read_word, buffer));
return false; return false;
@@ -785,11 +785,11 @@ typedef enum {
* block further out; and before a second plural, since a blocktranslate body * block further out; and before a second plural, since a blocktranslate body
* holds no tag that could take it. Any other tag is taken to be the innermost * holds no tag that could take it. Any other tag is taken to be the innermost
* group's, as Django takes it: a second of a tag the group holds only once, such * group's, as Django takes it: a second of a tag the group holds only once, such
* as a second "else", is an unexpected_block inside the group rather than a sign * as a second "else", is an unexpected_tag inside the group rather than a sign
* that it has ended. A counted blocktranslate still waiting for its plural is * that it has ended. A counted blocktranslate still waiting for its plural is
* missing it before anything but "plural". The marker closes the group as the * missing it before anything but "plural". The marker closes the group as the
* missing tag would have, or for a plural records it, leaving the group open. */ * missing tag would have, or for a plural records it, leaving the group open. */
static MissingResult scan_missing_block( static MissingResult scan_missing_tag(
struct Scanner *const scanner, struct Scanner *const scanner,
TSLexer *const lexer, TSLexer *const lexer,
const bool *const valid_symbols const bool *const valid_symbols
@@ -838,7 +838,7 @@ static MissingResult scan_missing_block(
array_delete(&name); array_delete(&name);
} }
} else if (name_in_list(&word, &innermost->middles)) { } else if (name_in_list(&word, &innermost->middles)) {
// a second of a tag the group holds only once is an unexpected_block in it // a second of a tag the group holds only once is an unexpected_tag in it
missing = name_is(&word, "plural"); missing = name_is(&word, "plural");
} else { } else {
missing = outer_group_expects(scanner, &word); missing = outer_group_expects(scanner, &word);
@@ -853,7 +853,7 @@ static MissingResult scan_missing_block(
} else { } else {
pop_group(scanner); pop_group(scanner);
} }
lexer->result_symbol = MissingBlock; lexer->result_symbol = MissingTag;
return Missing; return Missing;
} }
@@ -947,8 +947,8 @@ bool tree_sitter_django_external_scanner_scan(
* down, which skips the separator the grammar still has to match, and below * down, which skips the separator the grammar still has to match, and below
* the MatcherError check, which keeps them from being scanned during error * the MatcherError check, which keeps them from being scanned during error
* recovery. */ * recovery. */
if (valid_symbols[MissingBlock]) { if (valid_symbols[MissingTag]) {
switch (scan_missing_block(scanner, lexer, valid_symbols)) { switch (scan_missing_tag(scanner, lexer, valid_symbols)) {
case Missing: case Missing:
return true; return true;
case NotMissingAfterReading: case NotMissingAfterReading:
@@ -1038,7 +1038,7 @@ bool tree_sitter_django_external_scanner_scan(
} }
const unsigned match_amt = check_name(lexer, &group->name); const unsigned match_amt = check_name(lexer, &group->name);
const bool has_next_char = group->name.size ? check_name_char(lexer->lookahead) : check_name_start_char(lexer->lookahead); const bool has_next_char = group->name.size ? check_name_char(lexer->lookahead) : check_name_start_char(lexer->lookahead);
if (match_amt == group->name.size && !has_next_char && check_close_block_from(lexer)) { if (match_amt == group->name.size && !has_next_char && check_close_tag_from(lexer)) {
lexer->result_symbol = token; lexer->result_symbol = token;
return true; return true;
} }
@@ -1061,7 +1061,7 @@ bool tree_sitter_django_external_scanner_scan(
if (read_name(lexer, &name)) { if (read_name(lexer, &name)) {
// validate tokens after name // validate tokens after name
lexer->mark_end(lexer); lexer->mark_end(lexer);
if (check_close_block(lexer) || token == PushPartial && check_inline(lexer)) { if (check_close_tag(lexer) || token == PushPartial && check_inline(lexer)) {
array_delete(&scanner->pending_name); array_delete(&scanner->pending_name);
scanner->pending_name = name; scanner->pending_name = name;
lexer->result_symbol = token; lexer->result_symbol = token;
+3 -3
View File
@@ -17,9 +17,9 @@ Autoescape
(template (template
(content) (content)
(autoescape_group (autoescape_group
(autoescape_clause (autoescape_block
(autoescape_block) (autoescape_tag)
(template (template
(content))) (content)))
(endautoescape_block)) (endautoescape_tag))
(content)) (content))
+16 -16
View File
@@ -17,12 +17,12 @@ Block
(template (template
(content) (content)
(block_group (block_group
(block_clause
(block_block (block_block
(block_tag
name: (push_block)) name: (push_block))
(template (template
(content))) (content)))
(endblock_block (endblock_tag
(pop_block))) (pop_block)))
(content)) (content))
@@ -45,12 +45,12 @@ Block Matching End Tag
(template (template
(content) (content)
(block_group (block_group
(block_clause
(block_block (block_block
(block_tag
name: (push_block)) name: (push_block))
(template (template
(content))) (content)))
(endblock_block (endblock_tag
(pop_block))) (pop_block)))
(content)) (content))
@@ -75,21 +75,21 @@ Nested Blocks
(template (template
(content) (content)
(block_group (block_group
(block_clause
(block_block (block_block
(block_tag
name: (push_block)) name: (push_block))
(template (template
(content) (content)
(block_group (block_group
(block_clause
(block_block (block_block
(block_tag
name: (push_block)) name: (push_block))
(template (template
(content))) (content)))
(endblock_block (endblock_tag
(pop_block))) (pop_block)))
(content))) (content)))
(endblock_block (endblock_tag
(pop_block))) (pop_block)))
(content)) (content))
@@ -114,21 +114,21 @@ Nested Blocks End Tag
(template (template
(content) (content)
(block_group (block_group
(block_clause
(block_block (block_block
(block_tag
name: (push_block)) name: (push_block))
(template (template
(content) (content)
(block_group (block_group
(block_clause
(block_block (block_block
(block_tag
name: (push_block)) name: (push_block))
(template (template
(content))) (content)))
(endblock_block (endblock_tag
(pop_block))) (pop_block)))
(content))) (content)))
(endblock_block (endblock_tag
(pop_block))) (pop_block)))
(content)) (content))
@@ -153,20 +153,20 @@ Nested Blocks Mixed Tags
(template (template
(content) (content)
(block_group (block_group
(block_clause
(block_block (block_block
(block_tag
name: (push_block)) name: (push_block))
(template (template
(content) (content)
(block_group (block_group
(block_clause
(block_block (block_block
(block_tag
name: (push_block)) name: (push_block))
(template (template
(content))) (content)))
(endblock_block (endblock_tag
(pop_block))) (pop_block)))
(content))) (content)))
(endblock_block (endblock_tag
(pop_block))) (pop_block)))
(content)) (content))
+58 -58
View File
@@ -9,10 +9,10 @@ Blocktrans
(template (template
(content) (content)
(blocktranslate_group (blocktranslate_group
(blocktrans_clause (blocktrans_block
(blocktrans_block) (blocktrans_tag)
(content)) (content))
(endblocktrans_block)) (endblocktrans_tag))
(content)) (content))
================== ==================
@@ -26,10 +26,10 @@ Blocktranslate
(template (template
(content) (content)
(blocktranslate_group (blocktranslate_group
(blocktranslate_clause (blocktranslate_block
(blocktranslate_block) (blocktranslate_tag)
(content)) (content))
(endblocktranslate_block)) (endblocktranslate_tag))
(content)) (content))
================== ==================
@@ -43,9 +43,9 @@ Blocktrans Empty
(template (template
(content) (content)
(blocktranslate_group (blocktranslate_group
(blocktrans_clause (blocktrans_block
(blocktrans_block)) (blocktrans_tag))
(endblocktrans_block)) (endblocktrans_tag))
(content)) (content))
================== ==================
@@ -59,15 +59,15 @@ Blocktrans With A Placeholder
(template (template
(content) (content)
(blocktranslate_group (blocktranslate_group
(blocktrans_clause (blocktrans_block
(blocktrans_block) (blocktrans_tag)
(content) (content)
(template_variable (template_variable
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
(identifier)))))) (identifier))))))
(endblocktrans_block)) (endblocktrans_tag))
(content)) (content))
================== ==================
@@ -81,10 +81,10 @@ Blocktrans Trimmed
(template (template
(content) (content)
(blocktranslate_group (blocktranslate_group
(blocktrans_clause (blocktrans_block
(blocktrans_block) (blocktrans_tag)
(content)) (content))
(endblocktrans_block)) (endblocktrans_tag))
(content)) (content))
================== ==================
@@ -98,15 +98,15 @@ Blocktrans With
(template (template
(content) (content)
(blocktranslate_group (blocktranslate_group
(blocktrans_clause
(blocktrans_block (blocktrans_block
(blocktrans_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
(identifier))))) (identifier)))))
(content)) (content))
(endblocktrans_block)) (endblocktrans_tag))
(content)) (content))
================== ==================
@@ -120,8 +120,8 @@ Blocktrans With Several Bindings
(template (template
(content) (content)
(blocktranslate_group (blocktranslate_group
(blocktrans_clause
(blocktrans_block (blocktrans_block
(blocktrans_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
@@ -133,7 +133,7 @@ Blocktrans With Several Bindings
(variable_attribute (variable_attribute
(identifier))))) (identifier)))))
(content)) (content))
(endblocktrans_block)) (endblocktrans_tag))
(content)) (content))
================== ==================
@@ -147,8 +147,8 @@ Blocktrans With A Filtered Binding
(template (template
(content) (content)
(blocktranslate_group (blocktranslate_group
(blocktrans_clause
(blocktrans_block (blocktrans_block
(blocktrans_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
@@ -157,7 +157,7 @@ Blocktrans With A Filtered Binding
(filter_expression (filter_expression
(filter)))) (filter))))
(content)) (content))
(endblocktrans_block)) (endblocktrans_tag))
(content)) (content))
================== ==================
@@ -171,14 +171,14 @@ Blocktrans With Context
(template (template
(content) (content)
(blocktranslate_group (blocktranslate_group
(blocktrans_clause
(blocktrans_block (blocktrans_block
(blocktrans_tag
(filtered_value (filtered_value
(value (value
(literal (literal
(string))))) (string)))))
(content)) (content))
(endblocktrans_block)) (endblocktrans_tag))
(content)) (content))
================== ==================
@@ -192,11 +192,11 @@ Blocktrans With Asvar
(template (template
(content) (content)
(blocktranslate_group (blocktranslate_group
(blocktrans_clause
(blocktrans_block (blocktrans_block
(blocktrans_tag
asvar: (identifier)) asvar: (identifier))
(content)) (content))
(endblocktrans_block)) (endblocktrans_tag))
(content)) (content))
================== ==================
@@ -210,18 +210,18 @@ Blocktrans With Count And Plural
(template (template
(content) (content)
(blocktranslate_group (blocktranslate_group
(blocktrans_clause
(blocktrans_block (blocktrans_block
(blocktrans_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
(identifier))))) (identifier)))))
(content) (content)
(plural_clause (plural_block
(plural_block) (plural_tag)
(content))) (content)))
(endblocktrans_block)) (endblocktrans_tag))
(content)) (content))
================== ==================
@@ -235,17 +235,17 @@ Blocktrans With An Empty Singular
(template (template
(content) (content)
(blocktranslate_group (blocktranslate_group
(blocktrans_clause
(blocktrans_block (blocktrans_block
(blocktrans_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
(identifier))))) (identifier)))))
(plural_clause (plural_block
(plural_block) (plural_tag)
(content))) (content)))
(endblocktrans_block)) (endblocktrans_tag))
(content)) (content))
================== ==================
@@ -259,17 +259,17 @@ Blocktranslate With An Empty Plural
(template (template
(content) (content)
(blocktranslate_group (blocktranslate_group
(blocktranslate_clause
(blocktranslate_block (blocktranslate_block
(blocktranslate_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
(identifier))))) (identifier)))))
(content) (content)
(plural_clause (plural_block
(plural_block))) (plural_tag)))
(endblocktranslate_block)) (endblocktranslate_tag))
(content)) (content))
================== ==================
@@ -283,8 +283,8 @@ Blocktrans With Every Option
(template (template
(content) (content)
(blocktranslate_group (blocktranslate_group
(blocktrans_clause
(blocktrans_block (blocktrans_block
(blocktrans_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
@@ -301,10 +301,10 @@ Blocktrans With Every Option
(string)))) (string))))
asvar: (identifier)) asvar: (identifier))
(content) (content)
(plural_clause (plural_block
(plural_block) (plural_tag)
(content))) (content)))
(endblocktrans_block)) (endblocktrans_tag))
(content)) (content))
================== ==================
@@ -318,11 +318,11 @@ Blocktrans With Its Options Reordered
(template (template
(content) (content)
(blocktranslate_group (blocktranslate_group
(blocktrans_clause
(blocktrans_block (blocktrans_block
(blocktrans_tag
asvar: (identifier)) asvar: (identifier))
(content)) (content))
(endblocktrans_block)) (endblocktrans_tag))
(content)) (content))
================== ==================
@@ -356,16 +356,16 @@ Blocktrans With Count And No Plural
(template (template
(content) (content)
(blocktranslate_group (blocktranslate_group
(blocktrans_clause
(blocktrans_block (blocktrans_block
(blocktrans_tag
(identifier) (identifier)
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
(identifier))))) (identifier)))))
(content) (content)
(missing_plural_block)) (missing_plural_tag))
(endblocktrans_block)) (endblocktrans_tag))
(content)) (content))
================== ==================
@@ -459,21 +459,21 @@ Blocktrans With Two Plurals
(template (template
(content) (content)
(blocktranslate_group (blocktranslate_group
(blocktrans_clause
(blocktrans_block (blocktrans_block
(blocktrans_tag
(identifier) (identifier)
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
(identifier))))) (identifier)))))
(content) (content)
(plural_clause (plural_block
(plural_block) (plural_tag)
(content))) (content)))
(missing_endblocktrans_block)) (missing_endblocktrans_tag))
(unexpected_block) (unexpected_tag)
(content) (content)
(unexpected_block) (unexpected_tag)
(content)) (content))
================== ==================
@@ -557,15 +557,15 @@ Blocktrans Repeating An Option Of The Tag Before It
(template (template
(content) (content)
(blocktranslate_group (blocktranslate_group
(blocktrans_clause (blocktrans_block
(blocktrans_block) (blocktrans_tag)
(content)) (content))
(endblocktrans_block)) (endblocktrans_tag))
(blocktranslate_group (blocktranslate_group
(blocktrans_clause (blocktrans_block
(blocktrans_block) (blocktrans_tag)
(content)) (content))
(endblocktrans_block)) (endblocktrans_tag))
(content)) (content))
================== ==================
+16 -16
View File
@@ -9,8 +9,8 @@ Cache
(template (template
(content) (content)
(cache_group (cache_group
(cache_clause
(cache_block (cache_block
(cache_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -18,7 +18,7 @@ Cache
(identifier)) (identifier))
(template (template
(content))) (content)))
(endcache_block)) (endcache_tag))
(content)) (content))
================== ==================
@@ -32,8 +32,8 @@ Cache With A Variable Timeout
(template (template
(content) (content)
(cache_group (cache_group
(cache_clause
(cache_block (cache_block
(cache_tag
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
@@ -41,7 +41,7 @@ Cache With A Variable Timeout
(identifier)) (identifier))
(template (template
(content))) (content)))
(endcache_block)) (endcache_tag))
(content)) (content))
================== ==================
@@ -55,8 +55,8 @@ Cache With A Filtered Timeout
(template (template
(content) (content)
(cache_group (cache_group
(cache_clause
(cache_block (cache_block
(cache_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -69,7 +69,7 @@ Cache With A Filtered Timeout
(identifier)) (identifier))
(template (template
(content))) (content)))
(endcache_block)) (endcache_tag))
(content)) (content))
================== ==================
@@ -83,8 +83,8 @@ Cache With A Quoted Fragment Name
(template (template
(content) (content)
(cache_group (cache_group
(cache_clause
(cache_block (cache_block
(cache_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -92,7 +92,7 @@ Cache With A Quoted Fragment Name
(string)) (string))
(template (template
(content))) (content)))
(endcache_block)) (endcache_tag))
(content)) (content))
================== ==================
@@ -106,8 +106,8 @@ Cache Varying On Arguments
(template (template
(content) (content)
(cache_group (cache_group
(cache_clause
(cache_block (cache_block
(cache_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -123,7 +123,7 @@ Cache Varying On Arguments
(identifier))))) (identifier)))))
(template (template
(content))) (content)))
(endcache_block)) (endcache_tag))
(content)) (content))
================== ==================
@@ -137,8 +137,8 @@ Cache Varying On A Filtered Argument
(template (template
(content) (content)
(cache_group (cache_group
(cache_clause
(cache_block (cache_block
(cache_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -152,7 +152,7 @@ Cache Varying On A Filtered Argument
(filter)))) (filter))))
(template (template
(content))) (content)))
(endcache_block)) (endcache_tag))
(content)) (content))
================== ==================
@@ -166,8 +166,8 @@ Cache Using A Named Cache
(template (template
(content) (content)
(cache_group (cache_group
(cache_clause
(cache_block (cache_block
(cache_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -179,7 +179,7 @@ Cache Using A Named Cache
(string))))) (string)))))
(template (template
(content))) (content)))
(endcache_block)) (endcache_tag))
(content)) (content))
================== ==================
@@ -193,8 +193,8 @@ Cache Using An Unquoted Cache Name
(template (template
(content) (content)
(cache_group (cache_group
(cache_clause
(cache_block (cache_block
(cache_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -206,7 +206,7 @@ Cache Using An Unquoted Cache Name
(identifier))))) (identifier)))))
(template (template
(content))) (content)))
(endcache_block)) (endcache_tag))
(content)) (content))
================== ==================
+11 -11
View File
@@ -11,10 +11,10 @@ This is ignored
(template (template
(content) (content)
(comment_group (comment_group
(comment_clause (comment_block
(comment_block) (comment_tag)
(comment_content)) (comment_content))
(endcomment_block)) (endcomment_tag))
(content)) (content))
================== ==================
@@ -28,9 +28,9 @@ Comment Empty
(template (template
(content) (content)
(comment_group (comment_group
(comment_clause (comment_block
(comment_block)) (comment_tag))
(endcomment_block)) (endcomment_tag))
(content)) (content))
================== ==================
@@ -46,11 +46,11 @@ This is ignored
(template (template
(content) (content)
(comment_group (comment_group
(comment_clause
(comment_block (comment_block
(comment_tag
(string)) (string))
(comment_content)) (comment_content))
(endcomment_block)) (endcomment_tag))
(content)) (content))
================== ==================
@@ -66,8 +66,8 @@ Contains {% if x %} tag-like text
(template (template
(content) (content)
(comment_group (comment_group
(comment_clause (comment_block
(comment_block) (comment_tag)
(comment_content)) (comment_content))
(endcomment_block)) (endcomment_tag))
(content)) (content))
+3 -3
View File
@@ -8,7 +8,7 @@ Csp Nonce Attr
(template (template
(content) (content)
(csp_nonce_attr_block) (csp_nonce_attr_tag)
(content)) (content))
================== ==================
@@ -21,7 +21,7 @@ Csp Nonce Attr With Argument And As
(template (template
(content) (content)
(csp_nonce_attr_block (csp_nonce_attr_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -39,7 +39,7 @@ Csp Nonce Attr With Media Keyword
(template (template
(content) (content)
(csp_nonce_attr_block (csp_nonce_attr_tag
(filtered_value (filtered_value
(value (value
(literal (literal
+1 -1
View File
@@ -10,5 +10,5 @@ Csrf Token
(template (template
(content) (content)
(csrf_token_block) (csrf_token_tag)
(content)) (content))
+29 -29
View File
@@ -8,8 +8,8 @@ Custom Tag
(template (template
(content) (content)
(custom_tag_block (custom_tag
tag: (identifier)) tag_name: (identifier))
(content)) (content))
================== ==================
@@ -22,8 +22,8 @@ Custom Tag With Arguments
(template (template
(content) (content)
(custom_tag_block (custom_tag
tag: (identifier) tag_name: (identifier)
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
@@ -48,8 +48,8 @@ Custom Tag With Keyword Arguments
(template (template
(content) (content)
(custom_tag_block (custom_tag
tag: (identifier) tag_name: (identifier)
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
@@ -71,8 +71,8 @@ Custom Tag With As
(template (template
(content) (content)
(custom_tag_block (custom_tag
tag: (identifier) tag_name: (identifier)
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
@@ -90,8 +90,8 @@ Custom Tag With Filtered Argument
(template (template
(content) (content)
(custom_tag_block (custom_tag
tag: (identifier) tag_name: (identifier)
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
@@ -110,11 +110,11 @@ Custom Tag Does Not Nest
(template (template
(content) (content)
(custom_tag_block (custom_tag
tag: (identifier)) tag_name: (identifier))
(content) (content)
(custom_tag_block (custom_tag
tag: (identifier)) tag_name: (identifier))
(content)) (content))
================== ==================
@@ -144,7 +144,7 @@ Custom Filter
(identifier))) (identifier)))
(filter_expression (filter_expression
(filter (filter
name: (identifier))))) filter_name: (identifier)))))
(content)) (content))
================== ==================
@@ -164,7 +164,7 @@ Custom Filter With Argument
(identifier))) (identifier)))
(filter_expression (filter_expression
(filter (filter
name: (identifier) filter_name: (identifier)
argument: (value argument: (value
(literal (literal
(string))))))) (string)))))))
@@ -187,7 +187,7 @@ Custom Filter In A Chain With A Builtin
(identifier))) (identifier)))
(filter_expression (filter_expression
(filter (filter
name: (identifier)) filter_name: (identifier))
(filter)))) (filter))))
(content)) (content))
@@ -201,14 +201,14 @@ Custom Filter In A Tag
(template (template
(content) (content)
(firstof_block (firstof_tag
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
(identifier))) (identifier)))
(filter_expression (filter_expression
(filter (filter
name: (identifier))))) filter_name: (identifier)))))
(content)) (content))
================== ==================
@@ -241,7 +241,7 @@ Custom Tag Does Not Cover An End Tag
(template (template
(content) (content)
(unexpected_block) (unexpected_tag)
(content)) (content))
================== ==================
@@ -254,7 +254,7 @@ Custom Tag Does Not Cover A Part Of A Tag Group
(template (template
(content) (content)
(unexpected_block) (unexpected_tag)
(content)) (content))
================== ==================
@@ -284,8 +284,8 @@ A Name Reserved For A Tag Is Still An Argument
(template (template
(content) (content)
(custom_tag_block (custom_tag
tag: (identifier) tag_name: (identifier)
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
@@ -312,8 +312,8 @@ Custom Tag With Keyword Arguments And As
(template (template
(content) (content)
(custom_tag_block (custom_tag
tag: (identifier) tag_name: (identifier)
(identifier) (identifier)
(filtered_value (filtered_value
(value (value
@@ -337,15 +337,15 @@ Custom Tag Repeating A Keyword Of The Tag Before It
(template (template
(content) (content)
(custom_tag_block (custom_tag
tag: (identifier) tag_name: (identifier)
(identifier) (identifier)
(filtered_value (filtered_value
(value (value
(literal (literal
(number))))) (number)))))
(custom_tag_block (custom_tag
tag: (identifier) tag_name: (identifier)
(identifier) (identifier)
(filtered_value (filtered_value
(value (value
+5 -5
View File
@@ -11,7 +11,7 @@ Cycle Basic
(template (template
(content) (content)
(cycle_block (cycle_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -35,7 +35,7 @@ Cycle With As
(template (template
(content) (content)
(cycle_block (cycle_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -60,7 +60,7 @@ Cycle With As And Silent
(template (template
(content) (content)
(cycle_block (cycle_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -85,7 +85,7 @@ Cycle Referencing Existing Variable
(template (template
(content) (content)
(cycle_block (cycle_tag
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
@@ -136,7 +136,7 @@ Cycle Spanning Lines
(template (template
(content) (content)
(cycle_block (cycle_tag
(filtered_value (filtered_value
(value (value
(literal (literal
+1 -1
View File
@@ -10,5 +10,5 @@ Debug
(template (template
(content) (content)
(debug_block) (debug_tag)
(content)) (content))
+2 -2
View File
@@ -9,7 +9,7 @@ Extends With String
(template (template
(content) (content)
(extends_block (extends_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -27,7 +27,7 @@ Extends With Variable
(template (template
(content) (content)
(extends_block (extends_tag
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
+6 -6
View File
@@ -13,13 +13,13 @@ hello
(template (template
(content) (content)
(filter_group (filter_group
(filter_clause
(filter_block (filter_block
(filter_tag
(filter_expression (filter_expression
(filter))) (filter)))
(template (template
(content))) (content)))
(endfilter_block)) (endfilter_tag))
(content)) (content))
================== ==================
@@ -37,14 +37,14 @@ HELLO WORLD
(template (template
(content) (content)
(filter_group (filter_group
(filter_clause
(filter_block (filter_block
(filter_tag
(filter_expression (filter_expression
(filter) (filter)
(filter))) (filter)))
(template (template
(content))) (content)))
(endfilter_block)) (endfilter_tag))
(content)) (content))
================== ==================
@@ -63,12 +63,12 @@ HELLO WORLD
(template (template
(content) (content)
(filter_group (filter_group
(filter_clause
(filter_block (filter_block
(filter_tag
(filter_expression (filter_expression
(filter) (filter)
(filter))) (filter)))
(template (template
(content))) (content)))
(endfilter_block)) (endfilter_tag))
(content)) (content))
+2 -2
View File
@@ -8,7 +8,7 @@ Firstof Basic
(template (template
(content) (content)
(firstof_block (firstof_tag
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
@@ -33,7 +33,7 @@ Firstof With As
(template (template
(content) (content)
(firstof_block (firstof_tag
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
+56 -56
View File
@@ -13,8 +13,8 @@ For Basic
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
@@ -28,7 +28,7 @@ For Basic
(variable_attribute (variable_attribute
(identifier))))) (identifier)))))
(content))) (content)))
(endfor_block)) (endfor_tag))
(content)) (content))
================== ==================
@@ -46,8 +46,8 @@ For With Multiple Variables
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
variable: (identifier) variable: (identifier)
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
@@ -62,7 +62,7 @@ For With Multiple Variables
(variable_attribute (variable_attribute
(identifier))))) (identifier)))))
(content))) (content)))
(endfor_block)) (endfor_tag))
(content)) (content))
================== ==================
@@ -82,8 +82,8 @@ For With Empty
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
@@ -97,11 +97,11 @@ For With Empty
(variable_attribute (variable_attribute
(identifier))))) (identifier)))))
(content))) (content)))
(empty_clause (empty_block
(empty_block) (empty_tag)
(template (template
(content))) (content)))
(endfor_block)) (endfor_tag))
(content)) (content))
================== ==================
@@ -117,8 +117,8 @@ For With A Tag In Its Body
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
@@ -127,8 +127,8 @@ For With A Tag In Its Body
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -136,9 +136,9 @@ For With A Tag In Its Body
(identifier)))))) (identifier))))))
(template (template
(content))) (content)))
(endif_block)) (endif_tag))
(content))) (content)))
(endfor_block)) (endfor_tag))
(content)) (content))
================== ==================
@@ -154,8 +154,8 @@ For With A Nested For
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
@@ -164,8 +164,8 @@ For With A Nested For
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
@@ -173,9 +173,9 @@ For With A Nested For
(identifier))))) (identifier)))))
(template (template
(content))) (content)))
(endfor_block)) (endfor_tag))
(content))) (content)))
(endfor_block)) (endfor_tag))
(content)) (content))
================== ==================
@@ -193,8 +193,8 @@ For With Tags In Both Branches
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
@@ -203,8 +203,8 @@ For With Tags In Both Branches
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -212,15 +212,15 @@ For With Tags In Both Branches
(identifier)))))) (identifier))))))
(template (template
(content))) (content)))
(endif_block)) (endif_tag))
(content))) (content)))
(empty_clause (empty_block
(empty_block) (empty_tag)
(template (template
(content) (content)
(with_group (with_group
(with_clause
(with_block (with_block
(with_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
@@ -228,9 +228,9 @@ For With Tags In Both Branches
(number))))) (number)))))
(template (template
(content))) (content)))
(endwith_block)) (endwith_tag))
(content))) (content)))
(endfor_block)) (endfor_tag))
(content)) (content))
================== ==================
@@ -246,8 +246,8 @@ For With A Named Block In Its Body
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
@@ -256,15 +256,15 @@ For With A Named Block In Its Body
(template (template
(content) (content)
(block_group (block_group
(block_clause
(block_block (block_block
(block_tag
name: (push_block)) name: (push_block))
(template (template
(content))) (content)))
(endblock_block (endblock_tag
(pop_block))) (pop_block)))
(content))) (content)))
(endfor_block)) (endfor_tag))
(content)) (content))
================== ==================
@@ -280,8 +280,8 @@ For Nested In A Tag
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -290,8 +290,8 @@ For Nested In A Tag
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
@@ -299,8 +299,8 @@ For Nested In A Tag
(identifier))))) (identifier)))))
(template (template
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -308,10 +308,10 @@ For Nested In A Tag
(identifier)))))) (identifier))))))
(template (template
(content))) (content)))
(endif_block)))) (endif_tag))))
(endfor_block)) (endfor_tag))
(content))) (content)))
(endif_block)) (endif_tag))
(content)) (content))
================== ==================
@@ -325,14 +325,14 @@ For With An Empty Body
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
(identifier)))))) (identifier))))))
(endfor_block)) (endfor_tag))
(content)) (content))
================== ==================
@@ -348,8 +348,8 @@ a
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
@@ -357,7 +357,7 @@ a
(identifier))))) (identifier)))))
(template (template
(content))) (content)))
(endfor_block)) (endfor_tag))
(content)) (content))
================== ==================
@@ -373,8 +373,8 @@ a
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
variable: (identifier) variable: (identifier)
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
@@ -383,7 +383,7 @@ a
(identifier))))) (identifier)))))
(template (template
(content))) (content)))
(endfor_block)) (endfor_tag))
(content)) (content))
================== ==================
@@ -399,8 +399,8 @@ a
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
@@ -413,7 +413,7 @@ a
(string))))))) (string)))))))
(template (template
(content))) (content)))
(endfor_block)) (endfor_tag))
(content)) (content))
================== ==================
@@ -431,8 +431,8 @@ b
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
@@ -440,11 +440,11 @@ b
(identifier))))) (identifier)))))
(template (template
(content))) (content)))
(empty_clause (empty_block
(empty_block) (empty_tag)
(template (template
(content))) (content)))
(endfor_block)) (endfor_tag))
(content)) (content))
================== ==================
@@ -460,8 +460,8 @@ For Reversed With A Tag In Its Body
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
@@ -470,8 +470,8 @@ For Reversed With A Tag In Its Body
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -479,9 +479,9 @@ For Reversed With A Tag In Its Body
(identifier)))))) (identifier))))))
(template (template
(content))) (content)))
(endif_block)) (endif_tag))
(content))) (content)))
(endfor_block)) (endfor_tag))
(content)) (content))
================== ==================
@@ -514,8 +514,8 @@ For Over A Variable Named Reversed
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
@@ -523,7 +523,7 @@ For Over A Variable Named Reversed
(identifier))))) (identifier)))))
(template (template
(content))) (content)))
(endfor_block)) (endfor_tag))
(content)) (content))
================== ==================
@@ -537,8 +537,8 @@ For Over An Attribute Of A Variable Named Reversed
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
@@ -547,7 +547,7 @@ For Over An Attribute Of A Variable Named Reversed
(attribute))))) (attribute)))))
(template (template
(content))) (content)))
(endfor_block)) (endfor_tag))
(content)) (content))
================== ==================
@@ -561,8 +561,8 @@ For Over A Filtered Variable Named Reversed
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
@@ -572,7 +572,7 @@ For Over A Filtered Variable Named Reversed
(filter)))) (filter))))
(template (template
(content))) (content)))
(endfor_block)) (endfor_tag))
(content)) (content))
================== ==================
+21 -21
View File
@@ -8,7 +8,7 @@ Trans
(template (template
(content) (content)
(translate_block (translate_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -25,7 +25,7 @@ Translate
(template (template
(content) (content)
(translate_block (translate_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -42,7 +42,7 @@ Trans With A Variable
(template (template
(content) (content)
(translate_block (translate_tag
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
@@ -59,7 +59,7 @@ Trans With A Filtered Message
(template (template
(content) (content)
(translate_block (translate_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -78,7 +78,7 @@ Trans Noop
(template (template
(content) (content)
(translate_block (translate_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -95,7 +95,7 @@ Trans With As
(template (template
(content) (content)
(translate_block (translate_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -113,7 +113,7 @@ Trans With Context
(template (template
(content) (content)
(translate_block (translate_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -134,7 +134,7 @@ Trans With Every Option
(template (template
(content) (content)
(translate_block (translate_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -156,7 +156,7 @@ Trans With Its Options Reordered
(template (template
(content) (content)
(translate_block (translate_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -228,7 +228,7 @@ Get Available Languages
(template (template
(content) (content)
(get_available_languages_block (get_available_languages_tag
variable: (identifier)) variable: (identifier))
(content)) (content))
@@ -252,7 +252,7 @@ Get Current Language
(template (template
(content) (content)
(get_current_language_block (get_current_language_tag
variable: (identifier)) variable: (identifier))
(content)) (content))
@@ -266,7 +266,7 @@ Get Current Language Bidi
(template (template
(content) (content)
(get_current_language_bidi_block (get_current_language_bidi_tag
variable: (identifier)) variable: (identifier))
(content)) (content))
@@ -280,7 +280,7 @@ Get Language Info
(template (template
(content) (content)
(get_language_info_block (get_language_info_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -298,7 +298,7 @@ Get Language Info For A Variable
(template (template
(content) (content)
(get_language_info_block (get_language_info_tag
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
@@ -336,7 +336,7 @@ Get Language Info List
(template (template
(content) (content)
(get_language_info_list_block (get_language_info_list_tag
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
@@ -355,15 +355,15 @@ Language
(template (template
(content) (content)
(language_group (language_group
(language_clause
(language_block (language_block
(language_tag
(filtered_value (filtered_value
(value (value
(literal (literal
(string))))) (string)))))
(template (template
(content))) (content)))
(endlanguage_block)) (endlanguage_tag))
(content)) (content))
================== ==================
@@ -377,15 +377,15 @@ Language With A Variable
(template (template
(content) (content)
(language_group (language_group
(language_clause
(language_block (language_block
(language_tag
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
(identifier))))) (identifier)))))
(template (template
(content))) (content)))
(endlanguage_block)) (endlanguage_tag))
(content)) (content))
================== ==================
@@ -513,7 +513,7 @@ Translate With A Context From An Attribute Of Noop
(template (template
(content) (content)
(translate_block (translate_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -535,7 +535,7 @@ Translate With A Filtered Context Named After Noop
(template (template
(content) (content)
(translate_block (translate_tag
(filtered_value (filtered_value
(value (value
(literal (literal
+25 -25
View File
@@ -11,8 +11,8 @@ Hi
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -21,7 +21,7 @@ Hi
(attribute)))))) (attribute))))))
(template (template
(content))) (content)))
(endif_block)) (endif_tag))
(content)) (content))
================== ==================
@@ -37,8 +37,8 @@ working
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -46,7 +46,7 @@ working
(identifier)))))) (identifier))))))
(template (template
(content))) (content)))
(endif_block)) (endif_tag))
(content)) (content))
================== ==================
@@ -66,8 +66,8 @@ other
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -80,8 +80,8 @@ other
(number)))))) (number))))))
(template (template
(content))) (content)))
(elif_clause
(elif_block (elif_block
(elif_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -94,11 +94,11 @@ other
(number)))))) (number))))))
(template (template
(content))) (content)))
(else_clause (else_block
(else_block) (else_tag)
(template (template
(content))) (content)))
(endif_block)) (endif_tag))
(content)) (content))
================== ==================
@@ -114,8 +114,8 @@ yes
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -155,7 +155,7 @@ yes
(number)))))) (number))))))
(template (template
(content))) (content)))
(endif_block)) (endif_tag))
(content)) (content))
================== ==================
@@ -178,8 +178,8 @@ If Is Not None
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -192,7 +192,7 @@ If Is Not None
(none)))))) (none))))))
(template (template
(content))) (content)))
(endif_block)) (endif_tag))
(content)) (content))
================== ==================
@@ -206,8 +206,8 @@ If Is
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -220,7 +220,7 @@ If Is
(identifier)))))) (identifier))))))
(template (template
(content))) (content)))
(endif_block)) (endif_tag))
(content)) (content))
================== ==================
@@ -234,8 +234,8 @@ If Is Not
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -248,7 +248,7 @@ If Is Not
(identifier)))))) (identifier))))))
(template (template
(content))) (content)))
(endif_block)) (endif_tag))
(content)) (content))
================== ==================
@@ -262,8 +262,8 @@ If Is Not Not
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -276,7 +276,7 @@ If Is Not Not
(identifier)))))) (identifier))))))
(template (template
(content))) (content)))
(endif_block)) (endif_tag))
(content)) (content))
================== ==================
@@ -290,8 +290,8 @@ If With A Repeated Not
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -299,7 +299,7 @@ If With A Repeated Not
(identifier)))))) (identifier))))))
(template (template
(content))) (content)))
(endif_block)) (endif_tag))
(content)) (content))
================== ==================
@@ -313,8 +313,8 @@ If Not Before A Name Beginning With In
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -322,7 +322,7 @@ If Not Before A Name Beginning With In
(identifier)))))) (identifier))))))
(template (template
(content))) (content)))
(endif_block)) (endif_tag))
(content)) (content))
================== ==================
@@ -336,8 +336,8 @@ If Is Before A Name Beginning With Not
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -350,5 +350,5 @@ If Is Before A Name Beginning With Not
(identifier)))))) (identifier))))))
(template (template
(content))) (content)))
(endif_block)) (endif_tag))
(content)) (content))
+39 -39
View File
@@ -11,11 +11,11 @@ content
(template (template
(content) (content)
(ifchanged_group (ifchanged_group
(ifchanged_clause (ifchanged_block
(ifchanged_block) (ifchanged_tag)
(template (template
(content))) (content)))
(endifchanged_block)) (endifchanged_tag))
(content)) (content))
================== ==================
@@ -31,8 +31,8 @@ content
(template (template
(content) (content)
(ifchanged_group (ifchanged_group
(ifchanged_clause
(ifchanged_block (ifchanged_block
(ifchanged_tag
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
@@ -43,7 +43,7 @@ content
(identifier))))) (identifier)))))
(template (template
(content))) (content)))
(endifchanged_block)) (endifchanged_tag))
(content)) (content))
================== ==================
@@ -61,15 +61,15 @@ unchanged
(template (template
(content) (content)
(ifchanged_group (ifchanged_group
(ifchanged_clause (ifchanged_block
(ifchanged_block) (ifchanged_tag)
(template (template
(content))) (content)))
(else_clause (else_block
(else_block) (else_tag)
(template (template
(content))) (content)))
(endifchanged_block)) (endifchanged_tag))
(content)) (content))
================== ==================
@@ -87,8 +87,8 @@ unchanged
(template (template
(content) (content)
(ifchanged_group (ifchanged_group
(ifchanged_clause
(ifchanged_block (ifchanged_block
(ifchanged_tag
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
@@ -101,11 +101,11 @@ unchanged
(filter)))) (filter))))
(template (template
(content))) (content)))
(else_clause (else_block
(else_block) (else_tag)
(template (template
(content))) (content)))
(endifchanged_block)) (endifchanged_tag))
(content)) (content))
================== ==================
@@ -121,13 +121,13 @@ content
(template (template
(content) (content)
(ifchanged_group (ifchanged_group
(ifchanged_clause (ifchanged_block
(ifchanged_block) (ifchanged_tag)
(template (template
(content))) (content)))
(else_clause (else_block
(else_block)) (else_tag))
(endifchanged_block)) (endifchanged_tag))
(content)) (content))
================== ==================
@@ -149,26 +149,26 @@ c
(template (template
(content) (content)
(ifchanged_group (ifchanged_group
(ifchanged_clause (ifchanged_block
(ifchanged_block) (ifchanged_tag)
(template (template
(content))) (content)))
(else_clause (else_block
(else_block) (else_tag)
(template (template
(content) (content)
(ifchanged_group (ifchanged_group
(ifchanged_clause (ifchanged_block
(ifchanged_block) (ifchanged_tag)
(template (template
(content))) (content)))
(else_clause (else_block
(else_block) (else_tag)
(template (template
(content))) (content)))
(endifchanged_block)) (endifchanged_tag))
(content))) (content)))
(endifchanged_block)) (endifchanged_tag))
(content)) (content))
================== ==================
@@ -188,17 +188,17 @@ c
(template (template
(content) (content)
(ifchanged_group (ifchanged_group
(ifchanged_clause (ifchanged_block
(ifchanged_block) (ifchanged_tag)
(template (template
(content))) (content)))
(else_clause (else_block
(else_block) (else_tag)
(template (template
(content) (content)
(unexpected_block) (unexpected_tag)
(content))) (content)))
(endifchanged_block)) (endifchanged_tag))
(content)) (content))
================== ==================
@@ -216,11 +216,11 @@ b
(template (template
(content) (content)
(ifchanged_group (ifchanged_group
(ifchanged_clause (ifchanged_block
(ifchanged_block) (ifchanged_tag)
(template (template
(content) (content)
(unexpected_block) (unexpected_tag)
(content))) (content)))
(endifchanged_block)) (endifchanged_tag))
(content)) (content))
+8 -8
View File
@@ -8,7 +8,7 @@ Include With String
(template (template
(content) (content)
(include_block (include_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -25,7 +25,7 @@ Include With Variable
(template (template
(content) (content)
(include_block (include_tag
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
@@ -42,7 +42,7 @@ Include With A Filtered Name
(template (template
(content) (content)
(include_block (include_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -61,7 +61,7 @@ Include Only
(template (template
(content) (content)
(include_block (include_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -78,7 +78,7 @@ Include With Context
(template (template
(content) (content)
(include_block (include_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -100,7 +100,7 @@ Include With Several Bindings
(template (template
(content) (content)
(include_block (include_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -127,7 +127,7 @@ Include With Context And Only
(template (template
(content) (content)
(include_block (include_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -149,7 +149,7 @@ Include With Only Before With
(template (template
(content) (content)
(include_block (include_tag
(filtered_value (filtered_value
(value (value
(literal (literal
+21 -21
View File
@@ -9,11 +9,11 @@ Localize
(template (template
(content) (content)
(localize_group (localize_group
(localize_clause (localize_block
(localize_block) (localize_tag)
(template (template
(content))) (content)))
(endlocalize_block)) (endlocalize_tag))
(content)) (content))
================== ==================
@@ -27,11 +27,11 @@ Localize On
(template (template
(content) (content)
(localize_group (localize_group
(localize_clause (localize_block
(localize_block) (localize_tag)
(template (template
(content))) (content)))
(endlocalize_block)) (endlocalize_tag))
(content)) (content))
================== ==================
@@ -45,11 +45,11 @@ Localize Off
(template (template
(content) (content)
(localize_group (localize_group
(localize_clause (localize_block
(localize_block) (localize_tag)
(template (template
(content))) (content)))
(endlocalize_block)) (endlocalize_tag))
(content)) (content))
================== ==================
@@ -63,11 +63,11 @@ Localize Hugging Its Delimiters
(template (template
(content) (content)
(localize_group (localize_group
(localize_clause (localize_block
(localize_block) (localize_tag)
(template (template
(content))) (content)))
(endlocalize_block)) (endlocalize_tag))
(content)) (content))
================== ==================
@@ -81,16 +81,16 @@ Localize Nested
(template (template
(content) (content)
(localize_group (localize_group
(localize_clause (localize_block
(localize_block) (localize_tag)
(template (template
(localize_group (localize_group
(localize_clause (localize_block
(localize_block) (localize_tag)
(template (template
(content))) (content)))
(endlocalize_block)))) (endlocalize_tag))))
(endlocalize_block)) (endlocalize_tag))
(content)) (content))
================== ==================
@@ -124,11 +124,11 @@ Localize Unclosed
(template (template
(content) (content)
(localize_group (localize_group
(localize_clause (localize_block
(localize_block) (localize_tag)
(template (template
(content))) (content)))
(missing_endlocalize_block))) (missing_endlocalize_tag)))
================== ==================
+4 -4
View File
@@ -8,7 +8,7 @@ Load Single Library
(template (template
(content) (content)
(load_block (load_tag
(library (library
(identifier))) (identifier)))
(content)) (content))
@@ -23,7 +23,7 @@ Load Multiple Libraries
(template (template
(content) (content)
(load_block (load_tag
(library (library
(identifier)) (identifier))
(library (library
@@ -40,7 +40,7 @@ Load Dotted Library
(template (template
(content) (content)
(load_block (load_tag
(library (library
(identifier) (identifier)
(identifier))) (identifier)))
@@ -56,7 +56,7 @@ Load Names From Library
(template (template
(content) (content)
(load_block (load_tag
(identifier) (identifier)
(identifier) (identifier)
(library (library
+2 -2
View File
@@ -8,7 +8,7 @@ Lorem Words
(template (template
(content) (content)
(lorem_block (lorem_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -25,7 +25,7 @@ Lorem Paragraphs Random
(template (template
(content) (content)
(lorem_block (lorem_tag
(filtered_value (filtered_value
(value (value
(literal (literal
+163 -163
View File
@@ -9,8 +9,8 @@ Missing Endif At End Of Input
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -18,7 +18,7 @@ Missing Endif At End Of Input
(identifier)))))) (identifier))))))
(template (template
(content))) (content)))
(missing_endif_block))) (missing_endif_tag)))
================== ==================
Missing Endfor After Empty Missing Endfor After Empty
@@ -31,8 +31,8 @@ Missing Endfor After Empty
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
(identifier) (identifier)
(filtered_value (filtered_value
(value (value
@@ -40,11 +40,11 @@ Missing Endfor After Empty
(identifier))))) (identifier)))))
(template (template
(content))) (content)))
(empty_clause (empty_block
(empty_block) (empty_tag)
(template (template
(content))) (content)))
(missing_endfor_block))) (missing_endfor_tag)))
================== ==================
Missing Endblock At End Of Input Missing Endblock At End Of Input
@@ -57,12 +57,12 @@ Missing Endblock At End Of Input
(template (template
(content) (content)
(block_group (block_group
(block_clause
(block_block (block_block
(block_tag
(push_block)) (push_block))
(template (template
(content))) (content)))
(missing_endblock_block))) (missing_endblock_tag)))
================== ==================
Missing Endpartialdef At End Of Input Missing Endpartialdef At End Of Input
@@ -75,12 +75,12 @@ Missing Endpartialdef At End Of Input
(template (template
(content) (content)
(partialdef_group (partialdef_group
(partialdef_clause
(partialdef_block (partialdef_block
(partialdef_tag
(push_partial)) (push_partial))
(template (template
(content))) (content)))
(missing_endpartialdef_block))) (missing_endpartialdef_tag)))
================== ==================
Missing Endverbatim With An Empty Body Missing Endverbatim With An Empty Body
@@ -93,11 +93,11 @@ Missing Endverbatim With An Empty Body
(template (template
(content) (content)
(verbatim_group (verbatim_group
(verbatim_clause
(verbatim_block (verbatim_block
(verbatim_tag
(push_verbatim)) (push_verbatim))
(verbatim_content)) (verbatim_content))
(missing_endverbatim_block))) (missing_endverbatim_tag)))
================== ==================
Missing Endverbatim After A Tag In Its Text Missing Endverbatim After A Tag In Its Text
@@ -110,11 +110,11 @@ Missing Endverbatim After A Tag In Its Text
(template (template
(content) (content)
(verbatim_group (verbatim_group
(verbatim_clause
(verbatim_block (verbatim_block
(verbatim_tag
(push_verbatim)) (push_verbatim))
(verbatim_content)) (verbatim_content))
(missing_endverbatim_block))) (missing_endverbatim_tag)))
================== ==================
Missing Endcomment At End Of Input Missing Endcomment At End Of Input
@@ -127,10 +127,10 @@ Missing Endcomment At End Of Input
(template (template
(content) (content)
(comment_group (comment_group
(comment_clause (comment_block
(comment_block) (comment_tag)
(comment_content)) (comment_content))
(missing_endcomment_block))) (missing_endcomment_tag)))
================== ==================
Missing Endif Before An Outer End Tag Missing Endif Before An Outer End Tag
@@ -143,8 +143,8 @@ Missing Endif Before An Outer End Tag
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
(identifier) (identifier)
(filtered_value (filtered_value
(value (value
@@ -152,15 +152,15 @@ Missing Endif Before An Outer End Tag
(identifier))))) (identifier)))))
(template (template
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
(identifier))))))) (identifier)))))))
(missing_endif_block)))) (missing_endif_tag))))
(endfor_block)) (endfor_tag))
(content)) (content))
================== ==================
@@ -174,8 +174,8 @@ Unseen Outer Else Is Not A Missing Tag
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -183,18 +183,18 @@ Unseen Outer Else Is Not A Missing Tag
(identifier)))))) (identifier))))))
(template (template
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
(identifier) (identifier)
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
(identifier))))) (identifier)))))
(template (template
(unexpected_block) (unexpected_tag)
(content))) (content)))
(missing_endfor_block)))) (missing_endfor_tag))))
(endif_block)) (endif_tag))
(content)) (content))
================== ==================
@@ -208,20 +208,20 @@ Missing Endwith Before An Outer Endblock
(template (template
(content) (content)
(block_group (block_group
(block_clause
(block_block (block_block
(block_tag
(push_block)) (push_block))
(template (template
(with_group (with_group
(with_clause
(with_block (with_block
(with_tag
(identifier) (identifier)
(filtered_value (filtered_value
(value (value
(literal (literal
(number)))))) (number))))))
(missing_endwith_block)))) (missing_endwith_tag))))
(endblock_block (endblock_tag
(pop_block))) (pop_block)))
(content)) (content))
@@ -236,8 +236,8 @@ Missing Two End Tags At End Of Input
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
(identifier) (identifier)
(filtered_value (filtered_value
(value (value
@@ -245,8 +245,8 @@ Missing Two End Tags At End Of Input
(identifier))))) (identifier)))))
(template (template
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -254,8 +254,8 @@ Missing Two End Tags At End Of Input
(identifier)))))) (identifier))))))
(template (template
(content))) (content)))
(missing_endif_block)))) (missing_endif_tag))))
(missing_endfor_block))) (missing_endfor_tag)))
================== ==================
Missing Endblock Before An Outer Name Missing Endblock Before An Outer Name
@@ -268,16 +268,16 @@ Missing Endblock Before An Outer Name
(template (template
(content) (content)
(block_group (block_group
(block_clause
(block_block (block_block
(block_tag
(push_block)) (push_block))
(template (template
(block_group (block_group
(block_clause
(block_block (block_block
(block_tag
(push_block))) (push_block)))
(missing_endblock_block)))) (missing_endblock_tag))))
(endblock_block (endblock_tag
(pop_block))) (pop_block)))
(content)) (content))
@@ -292,16 +292,16 @@ Missing Endpartialdef Before An Outer Name
(template (template
(content) (content)
(partialdef_group (partialdef_group
(partialdef_clause
(partialdef_block (partialdef_block
(partialdef_tag
(push_partial)) (push_partial))
(template (template
(partialdef_group (partialdef_group
(partialdef_clause
(partialdef_block (partialdef_block
(partialdef_tag
(push_partial))) (push_partial)))
(missing_endpartialdef_block)))) (missing_endpartialdef_tag))))
(endpartialdef_block (endpartialdef_tag
(pop_partial))) (pop_partial)))
(content)) (content))
@@ -316,16 +316,16 @@ Missing Plural At End Of Input
(template (template
(content) (content)
(blocktranslate_group (blocktranslate_group
(blocktrans_clause
(blocktrans_block (blocktrans_block
(blocktrans_tag
(identifier) (identifier)
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
(identifier))))) (identifier)))))
(content) (content)
(missing_plural_block)) (missing_plural_tag))
(missing_endblocktrans_block))) (missing_endblocktrans_tag)))
================== ==================
Missing Plural Before Endblocktranslate Missing Plural Before Endblocktranslate
@@ -338,16 +338,16 @@ Missing Plural Before Endblocktranslate
(template (template
(content) (content)
(blocktranslate_group (blocktranslate_group
(blocktranslate_clause
(blocktranslate_block (blocktranslate_block
(blocktranslate_tag
(identifier) (identifier)
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
(identifier))))) (identifier)))))
(content) (content)
(missing_plural_block)) (missing_plural_tag))
(endblocktranslate_block)) (endblocktranslate_tag))
(content)) (content))
================== ==================
@@ -361,18 +361,18 @@ Missing Endblocktrans After Plural
(template (template
(content) (content)
(blocktranslate_group (blocktranslate_group
(blocktrans_clause
(blocktrans_block (blocktrans_block
(blocktrans_tag
(identifier) (identifier)
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
(identifier))))) (identifier)))))
(content) (content)
(plural_clause (plural_block
(plural_block) (plural_tag)
(content))) (content)))
(missing_endblocktrans_block))) (missing_endblocktrans_tag)))
================== ==================
Missing Endfor Before A Tag Without Spaces Missing Endfor Before A Tag Without Spaces
@@ -385,8 +385,8 @@ Missing Endfor Before A Tag Without Spaces
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -394,15 +394,15 @@ Missing Endfor Before A Tag Without Spaces
(identifier)))))) (identifier))))))
(template (template
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
(identifier) (identifier)
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
(identifier)))))) (identifier))))))
(missing_endfor_block)))) (missing_endfor_tag))))
(endif_block)) (endif_tag))
(content)) (content))
================== ==================
@@ -417,8 +417,8 @@ endif %}
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -426,15 +426,15 @@ endif %}
(identifier)))))) (identifier))))))
(template (template
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
(identifier) (identifier)
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
(identifier)))))) (identifier))))))
(missing_endfor_block)))) (missing_endfor_tag))))
(endif_block)) (endif_tag))
(content)) (content))
================== ==================
@@ -448,18 +448,18 @@ Missing Endif After A Custom End Tag
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
(identifier)))))) (identifier))))))
(template (template
(custom_tag_block (custom_tag
(identifier)) (identifier))
(content))) (content)))
(missing_endif_block))) (missing_endif_tag)))
================== ==================
Second Else After A Nested Else Is Unexpected Second Else After A Nested Else Is Unexpected
@@ -472,8 +472,8 @@ Second Else After A Nested Else Is Unexpected
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -481,8 +481,8 @@ Second Else After A Nested Else Is Unexpected
(identifier)))))) (identifier))))))
(template (template
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -490,15 +490,15 @@ Second Else After A Nested Else Is Unexpected
(identifier)))))) (identifier))))))
(template (template
(content))) (content)))
(else_clause (else_block
(else_block) (else_tag)
(template (template
(content) (content)
(unexpected_block) (unexpected_tag)
(content))) (content)))
(endif_block)) (endif_tag))
(content))) (content)))
(missing_endif_block))) (missing_endif_tag)))
================== ==================
Second Empty After A Nested Empty Is Unexpected Second Empty After A Nested Empty Is Unexpected
@@ -511,8 +511,8 @@ Second Empty After A Nested Empty Is Unexpected
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
(identifier) (identifier)
(filtered_value (filtered_value
(value (value
@@ -520,8 +520,8 @@ Second Empty After A Nested Empty Is Unexpected
(identifier))))) (identifier)))))
(template (template
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
(identifier) (identifier)
(filtered_value (filtered_value
(value (value
@@ -529,15 +529,15 @@ Second Empty After A Nested Empty Is Unexpected
(identifier))))) (identifier)))))
(template (template
(content))) (content)))
(empty_clause (empty_block
(empty_block) (empty_tag)
(template (template
(content) (content)
(unexpected_block) (unexpected_tag)
(content))) (content)))
(endfor_block)) (endfor_tag))
(content))) (content)))
(missing_endfor_block))) (missing_endfor_tag)))
================== ==================
Else Of An If Nested In An Else Else Of An If Nested In An Else
@@ -550,8 +550,8 @@ Else Of An If Nested In An Else
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -559,12 +559,12 @@ Else Of An If Nested In An Else
(identifier)))))) (identifier))))))
(template (template
(content))) (content)))
(else_clause (else_block
(else_block) (else_tag)
(template (template
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -572,12 +572,12 @@ Else Of An If Nested In An Else
(identifier)))))) (identifier))))))
(template (template
(content))) (content)))
(else_clause (else_block
(else_block) (else_tag)
(template (template
(content))) (content)))
(endif_block)))) (endif_tag))))
(endif_block)) (endif_tag))
(content)) (content))
================== ==================
@@ -591,8 +591,8 @@ Elif Of An If Nested In An Elif
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -600,8 +600,8 @@ Elif Of An If Nested In An Elif
(identifier)))))) (identifier))))))
(template (template
(content))) (content)))
(elif_clause
(elif_block (elif_block
(elif_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -609,8 +609,8 @@ Elif Of An If Nested In An Elif
(identifier)))))) (identifier))))))
(template (template
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -618,8 +618,8 @@ Elif Of An If Nested In An Elif
(identifier)))))) (identifier))))))
(template (template
(content))) (content)))
(elif_clause
(elif_block (elif_block
(elif_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -627,8 +627,8 @@ Elif Of An If Nested In An Elif
(identifier)))))) (identifier))))))
(template (template
(content))) (content)))
(endif_block)))) (endif_tag))))
(endif_block)) (endif_tag))
(content)) (content))
================== ==================
@@ -642,8 +642,8 @@ Empty Of A For Nested In An Empty
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
(identifier) (identifier)
(filtered_value (filtered_value
(value (value
@@ -651,12 +651,12 @@ Empty Of A For Nested In An Empty
(identifier))))) (identifier)))))
(template (template
(content))) (content)))
(empty_clause (empty_block
(empty_block) (empty_tag)
(template (template
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
(identifier) (identifier)
(filtered_value (filtered_value
(value (value
@@ -664,12 +664,12 @@ Empty Of A For Nested In An Empty
(identifier))))) (identifier)))))
(template (template
(content))) (content)))
(empty_clause (empty_block
(empty_block) (empty_tag)
(template (template
(content))) (content)))
(endfor_block)))) (endfor_tag))))
(endfor_block)) (endfor_tag))
(content)) (content))
================== ==================
@@ -683,8 +683,8 @@ Else Of An Ifchanged Nested In An Else Of An If
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -692,20 +692,20 @@ Else Of An Ifchanged Nested In An Else Of An If
(identifier)))))) (identifier))))))
(template (template
(content))) (content)))
(else_clause (else_block
(else_block) (else_tag)
(template (template
(ifchanged_group (ifchanged_group
(ifchanged_clause (ifchanged_block
(ifchanged_block) (ifchanged_tag)
(template (template
(content))) (content)))
(else_clause (else_block
(else_block) (else_tag)
(template (template
(content))) (content)))
(endifchanged_block)))) (endifchanged_tag))))
(endif_block)) (endif_tag))
(content)) (content))
================== ==================
@@ -719,16 +719,16 @@ Else Of An If Nested In An Else Of An Ifchanged
(template (template
(content) (content)
(ifchanged_group (ifchanged_group
(ifchanged_clause (ifchanged_block
(ifchanged_block) (ifchanged_tag)
(template (template
(content))) (content)))
(else_clause (else_block
(else_block) (else_tag)
(template (template
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -736,12 +736,12 @@ Else Of An If Nested In An Else Of An Ifchanged
(identifier)))))) (identifier))))))
(template (template
(content))) (content)))
(else_clause (else_block
(else_block) (else_tag)
(template (template
(content))) (content)))
(endif_block)))) (endif_tag))))
(endifchanged_block)) (endifchanged_tag))
(content)) (content))
================== ==================
@@ -755,8 +755,8 @@ Third Else Is Unexpected Too
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -764,15 +764,15 @@ Third Else Is Unexpected Too
(identifier)))))) (identifier))))))
(template (template
(content))) (content)))
(else_clause (else_block
(else_block) (else_tag)
(template (template
(content) (content)
(unexpected_block) (unexpected_tag)
(content) (content)
(unexpected_block) (unexpected_tag)
(content))) (content)))
(endif_block)) (endif_tag))
(content)) (content))
================== ==================
@@ -786,8 +786,8 @@ Second And Third Empty Are Unexpected
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
(identifier) (identifier)
(filtered_value (filtered_value
(value (value
@@ -795,15 +795,15 @@ Second And Third Empty Are Unexpected
(identifier))))) (identifier)))))
(template (template
(content))) (content)))
(empty_clause (empty_block
(empty_block) (empty_tag)
(template (template
(content) (content)
(unexpected_block) (unexpected_tag)
(content) (content)
(unexpected_block) (unexpected_tag)
(content))) (content)))
(endfor_block)) (endfor_tag))
(content)) (content))
================== ==================
@@ -817,19 +817,19 @@ Second And Third Else Of An Ifchanged Are Unexpected
(template (template
(content) (content)
(ifchanged_group (ifchanged_group
(ifchanged_clause (ifchanged_block
(ifchanged_block) (ifchanged_tag)
(template (template
(content))) (content)))
(else_clause (else_block
(else_block) (else_tag)
(template (template
(content) (content)
(unexpected_block) (unexpected_tag)
(content) (content)
(unexpected_block) (unexpected_tag)
(content))) (content)))
(endifchanged_block)) (endifchanged_tag))
(content)) (content))
================== ==================
@@ -843,13 +843,13 @@ Second Else Inside A Block Is Unexpected
(template (template
(content) (content)
(block_group (block_group
(block_clause
(block_block (block_block
(block_tag
(push_block)) (push_block))
(template (template
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -857,14 +857,14 @@ Second Else Inside A Block Is Unexpected
(identifier)))))) (identifier))))))
(template (template
(content))) (content)))
(else_clause (else_block
(else_block) (else_tag)
(template (template
(content) (content)
(unexpected_block) (unexpected_tag)
(content))) (content)))
(endif_block)))) (endif_tag))))
(endblock_block (endblock_tag
(pop_block))) (pop_block)))
(content)) (content))
@@ -879,8 +879,8 @@ Second Else Of An If In A For Is Unexpected
(template (template
(content) (content)
(for_group (for_group
(for_clause
(for_block (for_block
(for_tag
(identifier) (identifier)
(filtered_value (filtered_value
(value (value
@@ -888,8 +888,8 @@ Second Else Of An If In A For Is Unexpected
(identifier))))) (identifier)))))
(template (template
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
@@ -897,14 +897,14 @@ Second Else Of An If In A For Is Unexpected
(identifier)))))) (identifier))))))
(template (template
(content))) (content)))
(else_clause (else_block
(else_block) (else_tag)
(template (template
(content) (content)
(unexpected_block) (unexpected_tag)
(content))) (content)))
(endif_block)))) (endif_tag))))
(endfor_block)) (endfor_tag))
(content)) (content))
================== ==================
@@ -918,17 +918,17 @@ Stray End Tag After A Missing One
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
(identifier)))))) (identifier))))))
(template (template
(unexpected_block) (unexpected_tag)
(content))) (content)))
(missing_endif_block))) (missing_endif_tag)))
================== ==================
Endblock Naming No Open Block Endblock Naming No Open Block
@@ -941,19 +941,19 @@ Endblock Naming No Open Block
(template (template
(content) (content)
(block_group (block_group
(block_clause
(block_block (block_block
(block_tag
(push_block)) (push_block))
(template (template
(block_group (block_group
(block_clause
(block_block (block_block
(block_tag
(push_block)) (push_block))
(template (template
(unexpected_block) (unexpected_tag)
(content))) (content)))
(missing_endblock_block)))) (missing_endblock_tag))))
(missing_endblock_block))) (missing_endblock_tag)))
================== ==================
Second Else Is Not A Missing Tag Second Else Is Not A Missing Tag
@@ -966,18 +966,18 @@ Second Else Is Not A Missing Tag
(template (template
(content) (content)
(if_group (if_group
(if_clause
(if_block (if_block
(if_tag
(predicate (predicate
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
(identifier))))))) (identifier)))))))
(else_clause (else_block
(else_block) (else_tag)
(template (template
(unexpected_block))) (unexpected_tag)))
(endif_block)) (endif_tag))
(content)) (content))
================== ==================
+2 -2
View File
@@ -8,7 +8,7 @@ Now Basic
(template (template
(content) (content)
(now_block (now_tag
(string)) (string))
(content)) (content))
@@ -22,7 +22,7 @@ Now With As
(template (template
(content) (content)
(now_block (now_tag
(string) (string)
variable: (identifier)) variable: (identifier))
(content)) (content))
+1 -1
View File
@@ -8,6 +8,6 @@ Partial Basic
(template (template
(content) (content)
(partial_block (partial_tag
(identifier)) (identifier))
(content)) (content))
+4 -4
View File
@@ -13,12 +13,12 @@ Partialdef Basic
(template (template
(content) (content)
(partialdef_group (partialdef_group
(partialdef_clause
(partialdef_block (partialdef_block
(partialdef_tag
(push_partial)) (push_partial))
(template (template
(content))) (content)))
(endpartialdef_block (endpartialdef_tag
(pop_partial))) (pop_partial)))
(content)) (content))
@@ -37,11 +37,11 @@ Partialdef Inline
(template (template
(content) (content)
(partialdef_group (partialdef_group
(partialdef_clause
(partialdef_block (partialdef_block
(partialdef_tag
(push_partial)) (push_partial))
(template (template
(content))) (content)))
(endpartialdef_block (endpartialdef_tag
(pop_partial))) (pop_partial)))
(content)) (content))
+5 -5
View File
@@ -8,7 +8,7 @@ Querystring Empty
(template (template
(content) (content)
(querystring_block) (querystring_tag)
(content)) (content))
================== ==================
@@ -21,7 +21,7 @@ Querystring With Key Value
(template (template
(content) (content)
(querystring_block (querystring_tag
(identifier) (identifier)
(filtered_value (filtered_value
(value (value
@@ -39,7 +39,7 @@ Querystring With Identifier And Key Value
(template (template
(content) (content)
(querystring_block (querystring_tag
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
@@ -61,7 +61,7 @@ Querystring With Expression Argument And As
(template (template
(content) (content)
(querystring_block (querystring_tag
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
@@ -85,7 +85,7 @@ Querystring With Two Keys
(template (template
(content) (content)
(querystring_block (querystring_tag
(identifier) (identifier)
(filtered_value (filtered_value
(value (value
+1 -1
View File
@@ -8,7 +8,7 @@ Regroup Basic
(template (template
(content) (content)
(regroup_block (regroup_tag
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
+2 -2
View File
@@ -8,7 +8,7 @@ Resetcycle Bare
(template (template
(content) (content)
(resetcycle_block) (resetcycle_tag)
(content)) (content))
================== ==================
@@ -21,6 +21,6 @@ Resetcycle With Name
(template (template
(content) (content)
(resetcycle_block (resetcycle_tag
(identifier)) (identifier))
(content)) (content))
+3 -3
View File
@@ -13,9 +13,9 @@ Spaceless Basic
(template (template
(content) (content)
(spaceless_group (spaceless_group
(spaceless_clause (spaceless_block
(spaceless_block) (spaceless_tag)
(template (template
(content))) (content)))
(endspaceless_block)) (endspaceless_tag))
(content)) (content))
+9 -9
View File
@@ -8,7 +8,7 @@ Static
(template (template
(content) (content)
(static_block (static_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -25,7 +25,7 @@ Static With A Variable Path
(template (template
(content) (content)
(static_block (static_tag
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
@@ -42,7 +42,7 @@ Static With A Filtered Path
(template (template
(content) (content)
(static_block (static_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -61,7 +61,7 @@ Static With As
(template (template
(content) (content)
(static_block (static_tag
(filtered_value (filtered_value
(value (value
(literal (literal
@@ -109,7 +109,7 @@ Get Static Prefix
(template (template
(content) (content)
(get_static_prefix_block) (get_static_prefix_tag)
(content)) (content))
================== ==================
@@ -122,7 +122,7 @@ Get Static Prefix With As
(template (template
(content) (content)
(get_static_prefix_block (get_static_prefix_tag
variable: (identifier)) variable: (identifier))
(content)) (content))
@@ -136,7 +136,7 @@ Get Media Prefix With As
(template (template
(content) (content)
(get_media_prefix_block (get_media_prefix_tag
variable: (identifier)) variable: (identifier))
(content)) (content))
@@ -170,10 +170,10 @@ Load Names The Library, Not The Tag
(template (template
(content) (content)
(load_block (load_tag
(library (library
(identifier))) (identifier)))
(static_block (static_tag
(filtered_value (filtered_value
(value (value
(literal (literal
+2 -2
View File
@@ -8,7 +8,7 @@ Templatetag Openblock
(template (template
(content) (content)
(templatetag_block) (templatetag_tag)
(content)) (content))
================== ==================
@@ -21,5 +21,5 @@ Templatetag Closevariable
(template (template
(content) (content)
(templatetag_block) (templatetag_tag)
(content)) (content))
+16 -16
View File
@@ -9,11 +9,11 @@ Localtime
(template (template
(content) (content)
(localtime_group (localtime_group
(localtime_clause (localtime_block
(localtime_block) (localtime_tag)
(template (template
(content))) (content)))
(endlocaltime_block)) (endlocaltime_tag))
(content)) (content))
================== ==================
@@ -27,11 +27,11 @@ Localtime On
(template (template
(content) (content)
(localtime_group (localtime_group
(localtime_clause (localtime_block
(localtime_block) (localtime_tag)
(template (template
(content))) (content)))
(endlocaltime_block)) (endlocaltime_tag))
(content)) (content))
================== ==================
@@ -45,11 +45,11 @@ Localtime Off
(template (template
(content) (content)
(localtime_group (localtime_group
(localtime_clause (localtime_block
(localtime_block) (localtime_tag)
(template (template
(content))) (content)))
(endlocaltime_block)) (endlocaltime_tag))
(content)) (content))
================== ==================
@@ -83,15 +83,15 @@ Timezone
(template (template
(content) (content)
(timezone_group (timezone_group
(timezone_clause
(timezone_block (timezone_block
(timezone_tag
(filtered_value (filtered_value
(value (value
(literal (literal
(string))))) (string)))))
(template (template
(content))) (content)))
(endtimezone_block)) (endtimezone_tag))
(content)) (content))
================== ==================
@@ -105,15 +105,15 @@ Timezone With A Variable
(template (template
(content) (content)
(timezone_group (timezone_group
(timezone_clause
(timezone_block (timezone_block
(timezone_tag
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
(identifier))))) (identifier)))))
(template (template
(content))) (content)))
(endtimezone_block)) (endtimezone_tag))
(content)) (content))
================== ==================
@@ -127,8 +127,8 @@ Timezone With A Filtered Argument
(template (template
(content) (content)
(timezone_group (timezone_group
(timezone_clause
(timezone_block (timezone_block
(timezone_tag
(filtered_value (filtered_value
(value (value
(variable_attribute (variable_attribute
@@ -137,7 +137,7 @@ Timezone With A Filtered Argument
(filter)))) (filter))))
(template (template
(content))) (content)))
(endtimezone_block)) (endtimezone_tag))
(content)) (content))
================== ==================
@@ -170,7 +170,7 @@ Get Current Timezone
(template (template
(content) (content)
(get_current_timezone_block (get_current_timezone_tag
variable: (identifier)) variable: (identifier))
(content)) (content))
+4 -4
View File
@@ -8,7 +8,7 @@ Url Basic
(template (template
(content) (content)
(url_block (url_tag
(string)) (string))
(content)) (content))
@@ -22,7 +22,7 @@ Url With Positional Args
(template (template
(content) (content)
(url_block (url_tag
(string) (string)
(filtered_value (filtered_value
(value (value
@@ -44,7 +44,7 @@ Url With Keyword Args
(template (template
(content) (content)
(url_block (url_tag
(string) (string)
(identifier) (identifier)
(filtered_value (filtered_value
@@ -63,7 +63,7 @@ Url With As
(template (template
(content) (content)
(url_block (url_tag
(string) (string)
variable: (identifier)) variable: (identifier))
(content)) (content))
+10 -10
View File
@@ -9,11 +9,11 @@ Verbatim Basic
(template (template
(content) (content)
(verbatim_group (verbatim_group
(verbatim_clause
(verbatim_block (verbatim_block
(verbatim_tag
(push_verbatim)) (push_verbatim))
(verbatim_content)) (verbatim_content))
(endverbatim_block (endverbatim_tag
(pop_verbatim))) (pop_verbatim)))
(content)) (content))
@@ -28,10 +28,10 @@ Verbatim Empty
(template (template
(content) (content)
(verbatim_group (verbatim_group
(verbatim_clause
(verbatim_block (verbatim_block
(verbatim_tag
(push_verbatim))) (push_verbatim)))
(endverbatim_block (endverbatim_tag
(pop_verbatim))) (pop_verbatim)))
(content)) (content))
@@ -49,11 +49,11 @@ Verbatim Ignores Tags
(template (template
(content) (content)
(verbatim_group (verbatim_group
(verbatim_clause
(verbatim_block (verbatim_block
(verbatim_tag
(push_verbatim)) (push_verbatim))
(verbatim_content)) (verbatim_content))
(endverbatim_block (endverbatim_tag
(pop_verbatim))) (pop_verbatim)))
(content)) (content))
@@ -68,11 +68,11 @@ Verbatim With Name
(template (template
(content) (content)
(verbatim_group (verbatim_group
(verbatim_clause
(verbatim_block (verbatim_block
(verbatim_tag
(push_verbatim)) (push_verbatim))
(verbatim_content)) (verbatim_content))
(endverbatim_block (endverbatim_tag
(pop_verbatim))) (pop_verbatim)))
(content)) (content))
@@ -89,10 +89,10 @@ Avoid template rendering via the {% verbatim %}{% endverbatim %} block.
(template (template
(content) (content)
(verbatim_group (verbatim_group
(verbatim_clause
(verbatim_block (verbatim_block
(verbatim_tag
(push_verbatim)) (push_verbatim))
(verbatim_content)) (verbatim_content))
(endverbatim_block (endverbatim_tag
(pop_verbatim))) (pop_verbatim)))
(content)) (content))
+10 -10
View File
@@ -11,8 +11,8 @@ With Basic
(template (template
(content) (content)
(with_group (with_group
(with_clause
(with_block (with_block
(with_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
@@ -27,7 +27,7 @@ With Basic
(variable_attribute (variable_attribute
(identifier))))) (identifier)))))
(content))) (content)))
(endwith_block)) (endwith_tag))
(content)) (content))
================== ==================
@@ -43,8 +43,8 @@ With Multiple Variables
(template (template
(content) (content)
(with_group (with_group
(with_clause
(with_block (with_block
(with_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
@@ -63,7 +63,7 @@ With Multiple Variables
(variable_attribute (variable_attribute
(identifier))))) (identifier)))))
(content))) (content)))
(endwith_block)) (endwith_tag))
(content)) (content))
================== ==================
@@ -97,8 +97,8 @@ With Repeating A Binding Of The Tag Before It
(template (template
(content) (content)
(with_group (with_group
(with_clause
(with_block (with_block
(with_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
@@ -106,10 +106,10 @@ With Repeating A Binding Of The Tag Before It
(number))))) (number)))))
(template (template
(content))) (content)))
(endwith_block)) (endwith_tag))
(with_group (with_group
(with_clause
(with_block (with_block
(with_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
@@ -117,7 +117,7 @@ With Repeating A Binding Of The Tag Before It
(number))))) (number)))))
(template (template
(content))) (content)))
(endwith_block)) (endwith_tag))
(content)) (content))
================== ==================
@@ -131,8 +131,8 @@ With A Binding Named After A Literal
(template (template
(content) (content)
(with_group (with_group
(with_clause
(with_block (with_block
(with_tag
variable: (identifier) variable: (identifier)
(filtered_value (filtered_value
(value (value
@@ -140,5 +140,5 @@ With A Binding Named After A Literal
(number))))) (number)))))
(template (template
(content))) (content)))
(endwith_block)) (endwith_tag))
(content)) (content))