Files
tree-sitter-django/test/corpus/with.txt
T
danhanson 2181ff3403
Release / Version (push) Canceled after 0s
Release / CI (push) Canceled after 0s
Release / Prebuild (macos-latest) (push) Canceled after 0s
Release / Prebuild (ubuntu-24.04-arm) (push) Canceled after 0s
Release / Prebuild (ubuntu-latest) (push) Canceled after 0s
Release / Prebuild (windows-latest) (push) Canceled after 0s
Release / Tag and stage (push) Canceled after 0s
imported test cases
2026-09-18 04:18:23 -05:00

203 lines
3.4 KiB
Plaintext

==================
With Basic
==================
{% with total=business.employees.count %}
{{ total }}
{% endwith %}
---
(template
(content)
(with_group
(with_block
(with_tag
variable: (identifier)
(filtered_value
(value
(variable_attribute
(identifier)
(attribute)))))
(template
(content)
(template_variable
(filtered_value
(value
(variable_attribute
(identifier)))))
(content)))
(endwith_tag))
(content))
==================
With Multiple Variables
==================
{% with a=1 b=2 %}
{{ a }}
{% endwith %}
---
(template
(content)
(with_group
(with_block
(with_tag
variable: (identifier)
(filtered_value
(value
(literal
(number))))
variable: (identifier)
(filtered_value
(value
(literal
(number)))))
(template
(content)
(template_variable
(filtered_value
(value
(variable_attribute
(identifier)))))
(content)))
(endwith_tag))
(content))
==================
With Does Not Take An Else
==================
{% with x=1 %}a{% else %}b{% endwith %}
---
(template
(content)
(with_group
(with_block
(with_tag
variable: (identifier)
(filtered_value
(value
(literal
(number)))))
(template
(content)
(unexpected_tag)
(content)))
(endwith_tag))
(content))
==================
With A Binding Twice
==================
{% with a=1 a=2 %}x{% endwith %}
---
(template
(content)
(with_group
(with_block
(with_tag
(identifier)
(filtered_value
(value
(literal
(number))))
(unexpected_argument))
(template
(content)))
(endwith_tag))
(content))
==================
With A Binding Repeated Later
==================
{% with a=1 b=2 a=3 %}x{% endwith %}
---
(template
(content)
(with_group
(with_block
(with_tag
(identifier)
(filtered_value
(value
(literal
(number))))
(identifier)
(filtered_value
(value
(literal
(number))))
(unexpected_argument))
(template
(content)))
(endwith_tag))
(content))
==================
With Repeating A Binding Of The Tag Before It
==================
{% with a=1 %}x{% endwith %}{% with a=2 %}y{% endwith %}
---
(template
(content)
(with_group
(with_block
(with_tag
variable: (identifier)
(filtered_value
(value
(literal
(number)))))
(template
(content)))
(endwith_tag))
(with_group
(with_block
(with_tag
variable: (identifier)
(filtered_value
(value
(literal
(number)))))
(template
(content)))
(endwith_tag))
(content))
==================
With A Binding Named After A Literal
==================
{% with True=1 %}a{% endwith %}
---
(template
(content)
(with_group
(with_block
(with_tag
variable: (identifier)
(filtered_value
(value
(literal
(number)))))
(template
(content)))
(endwith_tag))
(content))