Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silent parsing failure when passing expressions to a MACRO #315

Open
petdance opened this issue Sep 20, 2023 · 0 comments
Open

Silent parsing failure when passing expressions to a MACRO #315

petdance opened this issue Sep 20, 2023 · 0 comments

Comments

@petdance
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant