Files
tree-sitter-django/test/corpus/with.txt
T

114 lines
1.8 KiB
Plaintext

==================
With Basic
==================
{% with total=business.employees.count %}
{{ total }}
{% endwith %}
---
(template
(content)
(with_group
(with_clause
variable: (identifier)
(filtered_value
(value
(variable_attribute
(identifier)
(attribute))))
(template
(content)
(template_variable
(filtered_value
(value
(variable_attribute
(identifier)))))
(content))))
(content))
==================
With Multiple Variables
==================
{% with a=1 b=2 %}
{{ a }}
{% endwith %}
---
(template
(content)
(with_group
(with_clause
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))))
(content))
==================
With A Binding Twice
:error
==================
{% with a=1 a=2 %}x{% endwith %}
---
==================
With A Binding Repeated Later
:error
==================
{% with a=1 b=2 a=3 %}x{% endwith %}
---
==================
With Repeating A Binding Of The Tag Before It
==================
{% with a=1 %}x{% endwith %}{% with a=2 %}y{% endwith %}
---
(template
(content)
(with_group
(with_clause
variable: (identifier)
(filtered_value
(value
(literal
(number))))
(template
(content))))
(with_group
(with_clause
variable: (identifier)
(filtered_value
(value
(literal
(number))))
(template
(content))))
(content))