TT3: /home/abw/web/london/tt3/slides/examples/with_fill_multi.tt3
Source
Tokens
Tree
Variables
Output
Template Source
[%
with
title
=
'Hello World'
{
fill
site
/
header
fill
site
/
content
fill
toolbar
/
developer
if
user
.
role
.
developer
}
%]
--EOF--
Source Tokens
tag_start
@0
[%
whitespace
@2
command with
@4
with
whitespace
@8
variable
@9
title
operator assign
@14
=
squote string
@15
'Hello World'
whitespace
@28
construct hash
@29
{
whitespace
@30
\n
command fill
@39
fill
whitespace
@43
filename
@44
site
filename
@48
/
filename
@49
header
whitespace
@55
\n
command fill
@64
fill
whitespace
@68
filename
@69
site
filename
@73
/
filename
@74
content
whitespace
@81
\n
command fill
@90
fill
whitespace
@94
filename
@95
toolbar
filename
@102
/
filename
@103
developer
whitespace
@112
command if
@113
if
whitespace
@115
variable
@116
user
operator dot
@120
.
word
@121
role
operator dot
@125
.
word
@126
developer
whitespace
@135
\n
terminator
@140
}
whitespace
@141
\n
tag_end
@142
%]
text
@144
\n
eof
@145
Parse Tree
with keyword
@4
with
Data
binary expr
@14
title = 'Hello World'
variable element
@9
title
=
squote string element
@15
'Hello World'
Block
fill keyword
@39
fill
Template
filename element
@44
site/header
fill keyword
@64
fill
Template
filename element
@69
site/content
if keyword
@113
if user.role.developer { fill }
Test
binary expr
@125
user.role.developer
binary expr
@120
user.role
variable element
@116
user
.
word element
@121
role
.
word element
@126
developer
True
fill keyword
@90
fill
Template
filename element
@95
toolbar/developer
text
@144
\n
Variables Used
title
Uses
@ line 1
[% with
title
='Hello World' {
user
Uses
@ line 4
fill toolbar/developer if
user
.role.developer
Vars
role
Uses
@ line 4
fill toolbar/developer if
user.role
.developer
Vars
developer
Uses
@ line 4
fill toolbar/developer if
user.role.developer
Generated Output
TT3 resource error at line 2 of /home/abw/web/london/tt3/slides/examples/with_fill_multi.tt3:
Error:
Requested template resource not found: site/header
Source:
fill site/header
^ here