TT3: /home/abw/web/london/tt3/slides/examples/with_runon.tt3
Source
Tokens
Tree
Variables
Output
Template Source
[%
with
x
=
100
,
z
=
300
;
"x is $x\n"
"y is "
~
y
~
"\n"
"z is "
z
"\n"
end
%]
--EOF--
Source Tokens
tag_start
@0
[%
whitespace
@2
command with
@4
with
whitespace
@8
variable
@9
x
operator assign
@10
=
number
@11
100
separator
@14
,
whitespace
@15
variable
@16
z
operator assign
@17
=
number
@18
300
delimiter
@21
;
whitespace
@22
\n
dquote
@31
"x is $x\n"
whitespace
@42
\n
dquote
@51
"y is "
whitespace
@58
text combine
@59
~
whitespace
@60
variable
@61
y
whitespace
@62
text combine
@63
~
whitespace
@64
dquote
@65
"\n"
whitespace
@69
\n
dquote
@78
"z is "
whitespace
@85
variable
@86
z
whitespace
@87
dquote
@88
"\n"
whitespace
@92
\n
end
@97
end
whitespace
@100
\n
tag_end
@101
%]
text
@103
\n
eof
@104
Parse Tree
with keyword
@4
with
Data
binary expr
@10
x = 100
variable element
@9
x
=
number element
@11
100
binary expr
@17
z = 300
variable element
@16
z
=
number element
@18
300
Block
dquote string element
@31
"x is $x\n"
text
@32
x is
variable element
@38
x
text
@39
\n
binary expr
@63
"y is " ~ y ~ "\n"
binary expr
@59
"y is " ~ y
string element
@51
"y is "
text
@51
y is
~
variable element
@61
y
~
string element
@65
"\n"
text
@65
\n
string element
@78
"z is "
text
@78
z is
variable element
@86
z
string element
@88
"\n"
text
@88
\n
text
@103
\n
Variables Used
x
Uses
@ line 2
"x is $
x
\n"
@ line 1
[% with
x
=100, z=300;
y
Uses
@ line 3
"y is " ~
y
~ "\n"
z
Uses
@ line 4
"z is "
z
"\n"
@ line 1
[% with x=100,
z
=300;
Generated Output
TT3 undefined data error at line 3 of /home/abw/web/london/tt3/slides/examples/with_runon.tt3:
Error:
Undefined value returned by expression: y
Source:
"y is " ~ y ~ "\n"
^ here