Add function calls for variables
This allows for functions to be called, currently with a single variable optionally passed. This also adds a check to make sure that variable literals are supported.
This commit is contained in:
parent
9f92f5c9e8
commit
f12d76704d
@ -87,7 +87,7 @@ variable_identifier
|
||||
|
||||
variable_accessor
|
||||
=
|
||||
variable_accessor_brackets | variable_accessor_dot
|
||||
variable_accessor_brackets | variable_accessor_call | variable_accessor_dot
|
||||
;
|
||||
|
||||
variable_accessor_brackets
|
||||
@ -95,6 +95,11 @@ variable_accessor_brackets
|
||||
"[" variable_identifier "]"
|
||||
;
|
||||
|
||||
variable_accessor_call
|
||||
=
|
||||
"(" [variable_identifier] ")"
|
||||
;
|
||||
|
||||
variable_accessor_dot
|
||||
=
|
||||
"." variable_identifier
|
||||
|
||||
@ -3,8 +3,12 @@
|
||||
{%block single key=val param=value %}
|
||||
test {{var}}
|
||||
{%endblock%}
|
||||
{% for item in dict_var.values() %}
|
||||
<li>{% block loop_item %}{{ item }}{% endblock %}</li>
|
||||
{% endfor %}
|
||||
{# comment contents
|
||||
across lines #}
|
||||
{% raw %}
|
||||
{% block %}fake content{{ fake vars }}
|
||||
{% endraw %}
|
||||
{% endraw %}
|
||||
{{ '{{' }}
|
||||
Loading…
Reference in New Issue
Block a user