[stringtemplate-interest] whitespace removal

Terence Parr PARRT at antlr.org
Mon Oct 12 17:34:23 PDT 2009


yo, i trim whitespace at the start and end of templates. easier to add  
\n and spaces in calling templates rather than trying to get rid of  
it.  Even in small templtes it makes sense:

<names:{n | <n>}>

You don't want the space between | and <n> to appear in output.

That means I would keep the "trim ws rule" in v4 as i have in v3.

Ter


More information about the stringtemplate-interest mailing list