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

Template Source

[% just x=10, y=20 { # x and y are the only variables # defined within this block z = x + y; } %] --EOF--

Source Tokens

tag_start@0[%
whitespace@2
command just@4just
whitespace@8
variable@9x
operator assign@10=
number@1110
separator@13,
whitespace@14
variable@15y
operator assign@16=
number@1720
whitespace@19
construct hash@20{
whitespace@21\n # x and y are the only variables \n # defined within this block\n
variable@108z
whitespace@109
operator assign@110=
whitespace@111
variable@112x
whitespace@113
number add@114+
whitespace@115
variable@116y
delimiter@117;
whitespace@118\n
terminator@123}
whitespace@124\n
tag_end@125%]
text@127\n
eof@128

Parse Tree

just keyword@4just
Data
binary expr@10x = 10
variable element@9x
=
number element@1110
binary expr@16y = 20
variable element@15y
=
number element@1720
Block
binary expr@110z = x + y
variable element@108z
=
binary expr@114x + y
variable element@112x
+
variable element@116y
text@127\n

Variables Used

x
Uses
@ line 4 z = x + y;
@ line 1[% just x=10, y=20 {
y
Uses
@ line 4 z = x + y;
@ line 1[% just x=10, y=20 {
z
Uses
@ line 4 z = x + y;

Generated Output