[stringtemplate-interest] ListDictionary Iteration
Todd Stout
todd.tstout at gmail.com
Tue Apr 28 12:52:02 PDT 2009
Sorry for the trouble, Michael's suggestion regarding a syntax change fixed
the problem. I had an issue in my test environment such that the updated
group file was not being used. The iteration coded as <cols.keys: { k |
<PropDef(name=k, type=cols.(k))> }>
works.
On Tue, Apr 28, 2009 at 12:59 PM, Todd Stout <todd.tstout at gmail.com> wrote:
> I'm using version 3.0.1.6846
>
>
> On Tue, Apr 28, 2009 at 12:57 PM, Sam Harwell <sharwell at pixelminegames.com
> > wrote:
>
>> 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/ac386a4c/attachment.html
More information about the stringtemplate-interest
mailing list