[stringtemplate-interest] adding Stuff for 3.2.1

Terence Parr parrt at cs.usfca.edu
Wed Aug 13 16:16:09 PDT 2008


http://www.antlr.org/download/build/stringtemplate-08-13-2008.16.tar.gz

o IF conditionals and list elements couldn't use template
   application.  Can do $if(names:{$it$})$Fail!$endif$ and
   $[names:{$it$!},phones]$ and $[names, ["foo","bar"]:{$it$!},phones]$
   Can't use IF inside of a [...] because those are expressions not
   statements.

o Made template output sensitive to the anchor of any enclosing template
   instances. ST used to ignore anchor unless you had a wrap and now it
   looks at anchor like an indent; uses widest.  ST used to give this:

	{ a,
	{ 1,
	2,
	3 }
	, b }

   for these templates where the first was stuck into second
	<\n>{ <stuff; anchor, separator=",\n"> }<\n>
         { <values; anchor, separator=", "> }

   but now gives:

	{ a,
	  { 1,
	    2,
	    3 }
	  , b };

   see testSubtemplatesAnchorToo()

o To deal with combined anchors and indentation, force indents to
   include any current anchor point. Prevents a check later in write
   to deal with anchors when starting new line.  See pushIndentation()




More information about the stringtemplate-interest mailing list