add conditionals query

This commit is contained in:
danhanson committed 2026-09-10 14:38:59 -05:00
1 parent 606bf7457f
commit c0a2e0099c
3 files changed
+96

No files matched your search

+7
View File
@@ -11,6 +11,13 @@ variable: (identifier) @local.definition
(block_clause) @local.scope
(partialdef_clause) @local.scope
; 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
; separate clause: "{% for x in ys %}a{% empty %}{% now "Y" as n %}{% endfor %}{{ n }}"
; is empty. queries/conditionals.scm names both clauses as branches of the
; same group and relies on this.
(empty_clause) @local.scope
; blocktranslate pushes a context for its "with" and "count" bindings. Its
; asvar target is not one of them: it is written in the same tag but assigned
; outside it, and carries an "asvar" field rather than "variable" so that this