[stringtemplate-interest] template existence testing

Terence Parr parrt at cs.usfca.edu
Sat Mar 29 13:07:25 PDT 2008


On Mar 29, 2008, at 5:43 AM, Zenaan Harkness wrote:
> Hi, I've come across a feature which I would find useful:
>
> It might sound odd, but I would like to be able to, within an  
> <if(...)>
> block, test for the existence of a specific template name.
>
> I need to provide template-level specialization of getter/setter  
> method
> bodies, and I'd like the template name to be tested for  
> automatically in
> the if block, so that a default method body is used normally, and the
> specialization is used otherwise.

Wouldn't normal group inheritance handle this case?

Ter


More information about the stringtemplate-interest mailing list