TT3: /home/abw/web/london/tt3/slides/examples/fill_block.tt3
Source
Tokens
Tree
Variables
Output
Template Source
[%
fill
message
%]
[%
block
message
%]
Hello
[%
name
or
'World'
%]
!
[%
end
%]
--EOF--
Source Tokens
tag_start
@0
[%
whitespace
@2
command fill
@3
fill
whitespace
@7
filename
@8
message
whitespace
@15
tag_end
@16
%]
text
@18
\n\n
tag_start
@20
[%
whitespace
@22
command block
@23
block
whitespace
@28
filename
@29
message
whitespace
@36
tag_end
@37
%]
text
@39
\nHello
tag_start
@46
[%
whitespace
@48
variable
@49
name
whitespace
@53
binary operator
@54
or
whitespace
@56
squote string
@57
'World'
whitespace
@64
tag_end
@65
%]
text
@67
!\n
tag_start
@69
[%
whitespace
@71
end
@72
end
whitespace
@75
tag_end
@76
%]
text
@78
\n\n
eof
@80
Parse Tree
fill keyword
@3
fill
Template
filename element
@8
message
text
@18
\n\n
block keyword
@23
block
Name
filename element
@29
message
Block
text
@39
\nHello
binary expr
@54
name or 'World'
variable element
@49
name
or
squote string element
@57
'World'
text
@67
!\n
text
@78
\n\n
Variables Used
name
Uses
@ line 4
Hello [%
name
or 'World' %]!
Generated Output
Hello World!