marijnh/acorn — pull request #88 by prust (2014-02-25 19:31:08+00:00)
Title: [walker] Supply parent argument to visitor functions

Added access to the parent node while walking.

There may be an existing way to get the parent node, but I couldn't find one. I'm not super-happy with the implementation (it's verbose & noisy), but I couldn't think of a cleaner way without touching the AST. I suppose a more generic approach would be to pass in an ancestors array instead of just the parent node.