[prev in list] [next in list] [prev in thread] [next in thread] 

List:       stringtemplate-interest
Subject:    Re: [stringtemplate-interest] Applying a property to a list
From:       Damien Cassou <damien.cassou () gmail ! com>
Date:       2009-06-15 11:53:11
Message-ID: 6ac749c10906150453s2e9bccact95ec245da0dd130a () mail ! gmail ! com
[Download RAW message or body]

On Mon, Jun 15, 2009 at 1:49 PM, Michael<micha-1@fantasymail.de> wrote:
>> I would like StringTemplate to print the property of each element of a
>> list. Something along:
>>
>> $struct.fields.name$
>>
>> where:
>>
>> - a struct has a getFields() method which returns a list of fields
>> - a field as a getName() method
>
> then this should work:
>
> $struct.fields: { $it.name$ }$

That's what I did :-). But adding a specific semantic for properties
applyed to lists might also be interesting.

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Lambdas are relegated to relative obscurity until Java makes them
popular by not having them." James Iry
_______________________________________________
stringtemplate-interest mailing list
stringtemplate-interest@antlr.org
http://www.antlr.org/mailman/listinfo/stringtemplate-interest
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic