[stringtemplate-interest] Asking template for its Attributes prior to running it

Terence Parr parrt at cs.usfca.edu
Mon Mar 22 12:39:58 PDT 2010


ah. then there are no attributes for that template.
Ter
On Mar 22, 2010, at 12:16 PM, Martin Clausen wrote:

>> From code (Java). The trick is that I need the attributes before the
> template is run. Which method will give me that? I tried getAttributes
> but that returns empty.
> 
> On Mon, Mar 22, 2010 at 7:13 PM, Terence Parr <parrt at cs.usfca.edu> wrote:
>> hi. do you mean from code or within a template? The template should give you back a map of the attributes no problem from Java code or whatever your target is.
>> Ter
>> On Mar 21, 2010, at 5:33 AM, Martin Clausen wrote:
>> 
>>> I know this is in the FAQ
>>> (http://www.antlr.org/wiki/pages/viewpage.action?pageId=1817), but the
>>> answer is not there.
>>> 
>>> Is there a way of asking template for its Attributes prior to running
>>> it? I can live with the answer not including an Attributes found in
>>> conditionally included templates etc.
>>> 
>>> Thanks for any help.
>>> 
>>> /mac
>> 
>> 



More information about the stringtemplate-interest mailing list