Template2
Template2 copied to clipboard
Silent parsing failure when passing expressions to a MACRO
In this template:
[% MACRO show( n ) BLOCK %]
value="[% n %]"
[% END %]
[%
x=5;
show(x);
show(x+2);
show(x-2);
show(x*2);
show(x/2);
%]
The parser fails on the x/2 line, similar to #314. If I comment out that line, then the x-2 line parses OK, but the incorrect value is passed to the macro:
value="5"
value="7"
value="5"
value="10"
It's like the x-2 passed parsing, but only passed the value of x to the macro. At the very least, the parser should fail is it does in #314, but here it silently passeds the incorrect. alue.