Closed yorickpeterse closed 10 years ago
Hm, not sure how this slipped my attention for a year. I think it such a feature could be provided by a #to_ruby method, which should also print the code for metadata.
@YorickPeterse still interested?
Not in particular. Thinking about it this feature wouldn't address the problem of nodes having extra metadata (that isn't specified in the child nodes). Thus, even if the output were valid Ruby code it wouldn't have all the information that might've initially been available.
Instead of this:
The method
AST::Node#inspect
should return the following instead:This makes it possible to directly copy-paste the output and run it (assuming the
#s()
method is defined).