Hi, recently Björn Kautler and I worked on a feature to test Spocks AST transforms by transpiling the resulting AST back to source.
We based it off the groovy-console code, but had to fix some bugs and improve insufficient rendering. Here is the PR for Spock if you are interested in taking a look https://github.com/spockframework/spock/pull/1292 Maybe you want to use this feature as well for Groovy's AST transforms, when Spock 2.0-M5 is released. If you are interested in backporting these changes I could provide a PR, or you could grab the code from Spock. cheers Leonard