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

Template Source

Hello [% name or 'World' %]! --EOF--

Source Tokens

text@0Hello
tag_start@6[%
whitespace@8
variable@9name
whitespace@13
binary operator@14or
whitespace@16
squote string@17'World'
whitespace@24
tag_end@25%]
text@27!\n
eof@29

Parse Tree

text@0Hello
binary expr@14name or 'World'
variable element@9name
or
squote string element@17'World'
text@27!\n

Variables Used

name
Uses
@ line 1Hello [% name or 'World' %]!

Generated Output

Hello World!