groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Bayer <andrew.ba...@gmail.com>
Subject So I want to be able to pretty-print ASTNode and children...
Date Thu, 16 Mar 2017 16:46:17 GMT
Yeah, I know, you can visualize the AST nicely in the Groovy console, but
I'm dealing with it in the context of Jenkins Pipelines' Groovy CPS
transformation/compilation, so...being able to pretty print would be really
nice for mapping our weirdness out. =)

I don't think there's anything out there that does this currently, so I'm
gonna write up a PR to add this. Now I need to figure out what the right
implementation would be. Do I go with adding useful .toString() methods to
the various ASTNode children that don't already have them (i.e., most of
the *Node classes, some Expressions, some Statements) or do I instead write
a helper class that has all the to-string logic for all the ASTNode
children in it? Thoughts?

A.

Mime
View raw message