Branch
Hash :
e03a7c24
Author :
Date :
2021-12-07T12:49:56
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
{% for foo in bar if baz %}{% endfor %}
{%- if foo() -%}{%- endif -%}
{% macro foobar() %}{% endmacro %}
{{ foo is even or bar is odd }}
----------------------------------------------------
[
["twig", [
["delimiter", "{%"],
["tag-name", "for"],
" foo ",
["operator", "in"],
" bar ",
["keyword", "if"],
" baz ",
["delimiter", "%}"]
]],
["twig", [
["delimiter", "{%"],
["tag-name", "endfor"],
["delimiter", "%}"]
]],
["twig", [
["delimiter", "{%-"],
["tag-name", "if"],
" foo",
["punctuation", "("],
["punctuation", ")"],
["delimiter", "-%}"]
]],
["twig", [
["delimiter", "{%-"],
["tag-name", "endif"],
["delimiter", "-%}"]
]],
["twig", [
["delimiter", "{%"],
["tag-name", "macro"],
" foobar",
["punctuation", "("],
["punctuation", ")"],
["delimiter", "%}"]
]],
["twig", [
["delimiter", "{%"],
["tag-name", "endmacro"],
["delimiter", "%}"]
]],
["twig", [
["delimiter", "{{"],
" foo ",
["operator", "is"],
["keyword", "even"],
["operator", "or"],
" bar ",
["operator", "is"],
["keyword", "odd"],
["delimiter", "}}"]
]]
]
----------------------------------------------------
Checks for keywords.