Skip to content

Silent parsing failure when passing expressions to a MACRO #315

Description

@petdance

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions