keyword_feature.test
1.42 KB
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
{% for foo in bar if baz %}{% endfor %}
{%- if foo() -%}{%- endif -%}
{% macro foobar() %}{% endmacro %}
{{ foo is even or bar is odd }}
----------------------------------------------------
[
["tag", [
["ld", [["punctuation", "{%"], ["keyword", "for"]]],
["property", "foo"],
["operator", "in"], ["property", "bar"],
["keyword", "if"], ["property", "baz"],
["rd", [["punctuation", "%}"]]]
]],
["tag", [
["ld", [["punctuation", "{%"], ["keyword", "endfor"]]],
["rd", [["punctuation", "%}"]]]
]],
["tag", [
["ld", [["punctuation", "{%-"], ["keyword", "if"]]],
["property", "foo"], ["punctuation", "("], ["punctuation", ")"],
["rd", [["punctuation", "-%}"]]]
]],
["tag", [
["ld", [["punctuation", "{%-"], ["keyword", "endif"]]],
["rd", [["punctuation", "-%}"]]]
]],
["tag", [
["ld", [["punctuation", "{%"], ["keyword", "macro"]]],
["property", "foobar"], ["punctuation", "("], ["punctuation", ")"],
["rd", [["punctuation", "%}"]]]
]],
["tag", [
["ld", [["punctuation", "{%"], ["keyword", "endmacro"]]],
["rd", [["punctuation", "%}"]]]
]],
["tag", [
["ld", [["punctuation", "{{"]]],
["property", "foo"],
["operator", "is"],
["keyword", "even"],
["operator", "or"],
["property", "bar"],
["operator", "is"],
["keyword", "odd"],
["rd", [["punctuation", "}}"]]]
]]
]
----------------------------------------------------
Checks for keywords.