groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shil Sinha <shil.si...@gmail.com>
Subject Re: Transform a Gstring to a lazy Gstring
Date Sat, 12 Sep 2015 23:02:53 GMT
Hi Paolo,

I worked on this a while ago but my implementation had a bug that wasn't
immediately obvious to me. I gave it another shot today and got it to work
-
https://github.com/shils/groovy-exp/blob/master/src/main/groovy/internal/transform/LazyGStringASTTransformation.groovy

Shil

On Wed, May 13, 2015 at 6:34 PM, Paolo Di Tommaso <paolo.ditommaso@gmail.com
> wrote:

> Hi,
>
> Does anybody have a suggestion how to write an AST transformation to
> convert any Gstring to a lazy Gstring?
>
> For example, given:
>
> "$foo and ${bar +2}"
>
>
> I would have it transformed to
>
> "${-> foo} and ${-> bar +2}"
>
>
>
> Any idea?
>
>
> Cheers,
> Paolo
>
>
>

Mime
View raw message