[stringtemplate-interest] adding Stuff for 3.2.1
Johannes Luber
jaluber at gmx.de
Wed Aug 13 16:22:16 PDT 2008
Terence Parr schrieb:
> 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 };
Wouldn't it make more sense to dedent the ", b };" again? What would
happen, if embed <stuff> twice otherwise?
Johannes
>
> 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()
>
>
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org:8080/mailman/listinfo/stringtemplate-interest
>
More information about the stringtemplate-interest
mailing list