[stringtemplate-interest] Is $if()$ needed?
Terence Parr
parrt at cs.usfca.edu
Mon Aug 18 16:11:00 PDT 2008
On Aug 18, 2008, at 12:56 PM, Roman Odaisky wrote:
>>> So $if$ is only syntactic sugar for large templates to avoid
>>> building fences
>>> of braces.
>>
>> Yeah, and elseif is nice
>
> Elseif:
>
> $a:{IF};null=b:{ELSEIF};null={ELSE}$
>
> (doesn’t work, but could have)
>
>
> Or with your recent addition:
>
> $first([a:{IF}, b:{ELSEIF}, {ELSE}])$
>
> (should work)
ooooh! You are a fiendishly clever man! or even
$[[a:{IF}, b:{ELSEIF}, {ELSE}]:{$it$}$
Ter
More information about the stringtemplate-interest
mailing list