[stringtemplate-interest] fixed if-condition thing

Terence Parr parrt at cs.usfca.edu
Thu Jul 2 15:17:32 PDT 2009


optimzed:

   WARNING: You now pay a penalty now for a separator if the iterated  
value is
   nullable.  Nullable if iterable or a template with nothing but IF  
statements.
   If nullable, ST writes each element to a temp buffer before  
emitting.  Expensive.

Ter
On Jul 2, 2009, at 2:15 PM, Terence Parr wrote:

> o IF with false condition results in missing not empty value. So,
>   <names:{n | <if(n.cool)><n><endif>}; separator=",">
>   doesn't emit a separator for non-cool names. See
>   http://www.antlr.org/pipermail/stringtemplate-interest/2009-July/002020.html
>
>   WARNING: You now pay a penalty now for a separator.  It writes each
> element to
>   a temp buffer before emitting.  Expensive.
>   Later, I can optimize to check if one chunk in template and it's a
> conditional.
>
> it's only in the depot.
>
> Ter
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org/mailman/listinfo/stringtemplate-interest



More information about the stringtemplate-interest mailing list