added a precedence example (refs #1057)

This commit is contained in:
Fabien Potencier
2013-05-01 10:03:10 +02:00
parent 04bc0698cc
commit 2acd63ae31
+11 -1
View File
@@ -558,7 +558,17 @@ even if you're not working with PHP you should feel comfortable with it.
operators listed first: ``b-and``, ``b-xor``, ``b-or``, ``or``, ``and``,
``==``, ``!=``, ``<``, ``>``, ``>=``, ``<=``, ``in``, ``..``, ``+``,
``-``, ``~``, ``*``, ``/``, ``//``, ``%``, ``is``, ``**``, ``|``, ``[]``,
and ``.``.
and ``.``:
.. code-block:: jinja
{% set greeting = 'Hello' %}
{% set name = 'Fabien' %}
{{ greeting ~ name|lower }} {# Hello fabien #}
{# use parenthesis to change precedence #}
{{ (greeting ~ name)|lower }} {# hello fabien #}
Literals
~~~~~~~~