[stringtemplate-interest] Re: [antlr-dev] crap, we need to fix the map issue with ST

Terence Parr parrt at cs.usfca.edu
Wed Jul 26 14:27:44 PDT 2006


Ok, I changed my mind as it just bit hard right on the arse!  Too  
hard to go find all the places that you ref a map as it's untyped in  
the templates.  Ok, simpler solution.  Leave:

<aMap>

to iterate over the values.  We add keys special property:

<aMap.keys:{key|...}>

to iterate over the keys.  values would be the default:  
<aMap.values>.  Make sense?

Ter

On Jul 26, 2006, at 12:46 PM, Terence Parr wrote:

> I hope Kunle concurs and you folks do to: I must break backward  
> compatibility with how ST handles maps.  Currently, <aMap> iterates  
> over the values. :(  How do you get the keys?  It should iterate  
> over the keys and then if you need the values you can get:
>
> <aMap:{key| <key> maps to <aMap.key>}>
>
> That *should* work and allows us to iterate maps without any  
> special new notation or concepts.
>
> Anybody have an opinion?  I have a few other backward incompat.  
> issues already for 2.3 so it's not alone.  2.3 should be clean  
> rather than force perfect back. compat.
>
> Ter
> _______________________________________________
> antlr-dev mailing list
> antlr-dev at antlr.org
> http://www.antlr.org:8080/mailman/listinfo/antlr-dev



More information about the stringtemplate-interest mailing list