1
2{{!-- HTML Element --}}
3
4<foo
5 {{! <- tag }}
6 string-attr="string"
7 {{! ^ property }}
8 {{! ^ operator }}
9 {{! ^ string }}
10 number-attr=12
11 {{! ^ number }}
12 mustache-attr={{value}}
13 {{! ^ variable }}
14 concat-attr="string {{mustache}}"
15 {{! ^ string }}
16 {{! ^ tag.delimiter }}
17 {{! ^ variable }}
18 class="foo {{if condition "bar"}}"
19 {{! ^ conditional }}
20 {{! ^ variable }}
21 {{! ^ string }}
22 ...attributes
23 {{! ^ property }}
24></foo>
25
26
27
28{{!-- Primitives --}}
29
30{{true}}
31 {{! <- boolean }}
32{{false}}
33 {{! <- boolean }}
34{{"a string"}}
35 {{! <- string }}
36{{42}}
37 {{! <- number }}
38
39
40
41{{!-- Path Expression --}}
42
43{{foo.bar}}
44{{! <- @tag.delimiter }}
45{{! ^ @variable }}
46{{! ^ @tag.delimiter }}
47{{! ^ @variable }}
48
49{{this.bar}}
50{{! ^ @variable.builtin }}
51
52
53
54{{!-- Glimmer Component API --}}
55
56<MyComponent @foo={{bar}} as |whatever|>
57{{! ^ constructor }}
58{{! ^ property }}
59{{! ^ keyword }}
60{{! ^ operator }}
61{{! ^ operator }}
62 {{whatever}}
63</MyComponent>
64
65<Parent::Child />
66{{! ^ constructor }}
67{{! ^ constructor }}
68{{! ^ constructor }}
69
70<Modal>
71 <:header>
72 {{! <- tag }}
73 </:header>
74 {{! ^ tag }}
75</Modal>
76
77
78{{!-- Helper Invocation --}}
79
80{{some-helper (sub-expression this.property)}}
81{{! ^ function }}
82{{! ^ @tag.delimiter }}
83{{! ^ function }}
84{{! ^ variable.builtin }}
85{{! ^ variable }}
86
87
88
89{{!-- Keywords --}}
90
91{{yield whatever}}
92{{! ^ keyword }}
93
94{{yield}}
95{{! ^ keyword}}
96
97{{outlet}}
98{{! ^ keyword }}
99
100
101{{!-- Block Statements --}}
102
103{{#if condition}}
104{{! <- @tag.delimiter }}
105{{! ^ conditional }}
106{{! ^ variable }}
107{{else}}
108{{! ^ conditional }}
109{{/if}}
110{{! <- @tag.delimiter }}
111{{! ^ conditional }}
112
113{{#each array key="@index" as |item|}}
114{{! <- @tag.delimiter }}
115{{! ^ conditional }}
116{{! ^ variable }}
117{{! ^ property }}
118{{! ^ string }}
119{{! ^ keyword }}
120{{! ^ operator }}
121{{! ^ variable }}
122{{! ^ operator }}
123{{/each}}
124{{! <- @tag.delimiter }}
125{{! ^ conditional }}
126
127{{#let (or "first" "second") as |result|}}
128{{! ^ conditional }}
129{{/let}}
130{{! ^ conditional }}
131
132{{#with (or "first" "second") as |result|}}
133{{! ^ conditional }}
134{{/with}}
135{{! ^ conditional }}
136
137{{#each-in object as |result|}}
138{{! ^ conditional }}
139{{/each-in}}
140{{! ^ conditional }}
141
142
143
144{{!-- Comments --}}
145
146{{! testing }}
147{{! <- comment }}
148<!-- testing -->
149{{! <- comment }}
150{{!-- testing --}}
151{{! <- comment }}