[stringtemplate-interest] StringTemplate 3.1 - elseif expression evaluation bug
Zenaan Harkness
zen at freedbms.net
Mon Apr 14 08:55:26 PDT 2008
On Tue, Apr 15, 2008 at 01:45:48AM +1000, Zenaan Harkness wrote:
> And I have a StringTemplateGroup, java.stg:
>
> returnsJavadoc(entity) ::= <<
> @return <if(entity.description.brief)><entity.description.brief>
> <elseif(entity.description.full)><entity.description.full>
> <else>No javadoc found.
> <endif>
> >
That should have ended >>, not >, of course.
If I dispense with using <elseif(..)>, and change them to
<else><if(..)>...<endif><endif> etc, then things work.
So it seems clear there is some bug in the recognition of elseif as an
inbuilt conditional/ ST language construct, and instead buggily thinking
elseif is a user template.
Zen
--
Homepage: www.SoulSound.net -- Free Australia: www.UPMART.org
Please respect the confidentiality of this email as sensibly warranted.
More information about the stringtemplate-interest
mailing list