[stringtemplate-interest] Re : Attributes not set
Matthieu Wipliez
mwipliez at yahoo.fr
Thu Jan 27 07:30:26 PST 2011
Ok, thanks, I'll try that!
Matthieu
>
>De : Udo Borkowski <ub at abego-software.de>
>À : Matthieu Wipliez <mwipliez at yahoo.fr>
>Cc : "stringtemplate-interest at antlr.orgList"
<stringtemplate-interest at antlr.org>
>Envoyé le : Ven 28 janvier 2011, 0h 03min 42s
>Objet : Re: [stringtemplate-interest] Attributes not set
>
>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/a8093494/attachment.html
More information about the stringtemplate-interest
mailing list