TT3: /home/abw/web/london/tt3/slides/examples/side_effect_for.tt3

Template Source

[% for item in menu fill menu/item %] [% fill menu/item for item in menu %] --EOF--

Source Tokens

tag_start@0[%
whitespace@2
command for@4for
whitespace@7
variable@8item
whitespace@12
terminator@13in
whitespace@15
variable@16menu
whitespace@20\n
command fill@29fill
whitespace@33
filename@34menu
filename@38/
filename@39item
whitespace@43\n
tag_end@44%]
text@46\n\n
tag_start@48[%
whitespace@50
command fill@52fill
whitespace@56
filename@57menu
filename@61/
filename@62item
whitespace@66\n
command for@75for
whitespace@78
variable@79item
whitespace@83
terminator@84in
whitespace@86
variable@87menu
whitespace@91\n
tag_end@92%]
text@94\n
eof@95

Parse Tree

for keyword@4for
Item
variable element@8item
List
variable element@16menu
Then
fill keyword@29fill
Template
filename element@34menu/item
text@46\n\n
for keyword@75for
Item
variable element@79item
List
variable element@87menu
Then
fill keyword@52fill
Template
filename element@57menu/item
text@94\n

Variables Used

item
Uses
@ line 1[% for item in menu
@ line 6 for item in menu
menu
Uses
@ line 1[% for item in menu
@ line 6 for item in menu

Generated Output

TT3 undefined data error at line 1 of /home/abw/web/london/tt3/slides/examples/side_effect_for.tt3:
Error: Undefined value returned by expression: menu
Source: [% for item in menu
^ here