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

Template Source

[% if add_header fill site/header %] [% fill site/header if add_header %] --EOF--

Source Tokens

tag_start@0[%
whitespace@2
command if@4if
whitespace@6
variable@7add_header
whitespace@17\n
command fill@26fill
whitespace@30
filename@31site
filename@35/
filename@36header
whitespace@42\n
tag_end@43%]
text@45\n\n
tag_start@47[%
whitespace@49
command fill@51fill
whitespace@55
filename@56site
filename@60/
filename@61header
whitespace@67\n
command if@76if
whitespace@78
variable@79add_header
whitespace@89\n
tag_end@90%]
text@92\n
eof@93

Parse Tree

if keyword@4if add_header { fill }
Test
variable element@7add_header
True
fill keyword@26fill
Template
filename element@31site/header
text@45\n\n
if keyword@76if add_header { fill }
Test
variable element@79add_header
True
fill keyword@51fill
Template
filename element@56site/header
text@92\n

Variables Used

add_header
Uses
@ line 1[% if add_header
@ line 6 if add_header

Generated Output

TT3 undefined data error at line 1 of /home/abw/web/london/tt3/slides/examples/side_effect_if.tt3:
Error: Undefined value returned by expression: add_header
Source: [% if add_header
^ here