[stringtemplate-interest] mapping templates

Sam Harwell sharwell at pixelminegames.com
Wed Oct 7 16:28:33 PDT 2009


This is the general form:

<{sequence}:{template taking one argument}>

If the template is a template named "bold" declared elsewhere, then the
form <names:bold> makes much more sense, especially since "bold()" would
imply that the template takes no arguments.

Sam

-----Original Message-----
From: stringtemplate-interest-bounces at antlr.org
[mailto:stringtemplate-interest-bounces at antlr.org] On Behalf Of Terence
Parr
Sent: Wednesday, October 07, 2009 2:29 PM
To: stringtemplate-interest Template
Subject: [stringtemplate-interest] mapping templates

Hi, there is a syntax bugaboo in ST v3.

<names:bold()> means apply bold to each element of names but t=foo()  
in an arg list or wherever means invoke foo and put ST into t.  Seems  
like foo should be a template name and foo() should be an invocation.   
That would imply we'd chnage to:

<names:bold>

Makes more sense if you ask me.  Other thoughts?

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