[stringtemplate-interest] Attributes not set
Udo Borkowski
ub at abego-software.de
Thu Jan 27 07:03:42 PST 2011
Hi Matthieu,
I assume you refer to a message like this:
> passed 1 arg(s) to template t with 2 declared arg(s)
This was produced when calling <t(p1="x")> with this template:
t(p1,p2) ::= <<
<p1><p2>
>>
You can avoid this message by providing a default value for the "unused" parameter/attribute, e.g.:
t(p1,p2="") ::= <<
<p1><p2>
>>
Udo
On 27.01.2011, at 15:20, Matthieu Wipliez wrote:
> Hi,
>
> I have found out that StringTemplate v4 beta 2 issues a warning (on System.err)
> when a template is called and not all attributes have a value. This allows me to
> reuse a template for two different things. I thought it was legal to do that, is
> it not the case? Is it a bug in ST?
>
> Cheers
> Matthieu
>
>
>
>
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org/mailman/listinfo/stringtemplate-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20110127/d759e1a0/attachment.html
More information about the stringtemplate-interest
mailing list