[stringtemplate-interest] ListDictionary Iteration

Sam Harwell sharwell at pixelminegames.com
Tue Apr 28 10:57:22 PDT 2009


What version of the C# StringTemplate library are you using?

 

Sam

 

From: stringtemplate-interest-bounces at antlr.org
[mailto:stringtemplate-interest-bounces at antlr.org] On Behalf Of Todd
Stout
Sent: Monday, April 27, 2009 9:04 PM
To: stringtemplate-interest at antlr.org
Subject: [stringtemplate-interest] ListDictionary Iteration

 

I'm trying to iterate over a ListDictionary (C# StringTemplate) in a
template and have each list item invoke another template:

 
DataDefAssign(cols) :=




<<




<cols.keys: { k | <PropDef(name=<k>, type=<cols.(k)>) }>




>>





The above template does not generate anything. If I inline an anonymous
template instead of trying to invoke the PropDef template it works as
expected. Does the iteration only allow anonymous templates?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20090428/0406ed16/attachment-0001.html 


More information about the stringtemplate-interest mailing list