[stringtemplate-interest] nulls & templates...

Terence Parr parrt at cs.usfca.edu
Tue Oct 31 17:59:42 PST 2006


On Oct 31, 2006, at 5:42 PM, Robert Hill wrote:

> Instead of this..
> <if(mem.explicitSql)><mem.explicitSql><else>:<userType.name><endif>
>
> I'd like to do
> <mem.explicitSql; null=":<userType.name>">
>
> Is there anyway you can incorporate templates to be expanded in the  
> null=
> attribute?

I think null={...} would work.

> Also, in the separator= would be good?

I think you can even do separator=anotherTemplate()

:)

> Since they're strings.... and its.. well, string-template, you'd  
> kind of
> assume it would be a good idea to accept templates anywhere string are
> accepted right? What with all this recursive-mumbo-jumbo.. :)

  you are speaking my language man!

> How cool would that be?. I'll tell you. Damn cool.

  it's already cool... try it! ;)

> Its late. Im off to bed, cos someone's going to point out the  
> syntax is
> wrong, and it already does it.

yep! ;)

  one of the things that people like is the uniformity of ST :)

Ter


More information about the stringtemplate-interest mailing list