[stringtemplate-interest] if-condition in subtemplates

Johannes Luber jaluber at gmx.de
Mon Aug 25 07:55:43 PDT 2008


Sindre Svendby schrieb:
> Another really basic question:
> basicEks() ::= <<
> $int sum = 21;$
> $sum$
> 
> Shouldn't this have 21 as output?

StringTemplate doesn't allow arbitrary computations in the template
files. You can probably create a model method SetSumTo21() and call it
before you output sum, though.

Johannes
> 
> Sindre
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org:8080/mailman/listinfo/stringtemplate-interest
> 



More information about the stringtemplate-interest mailing list