Adds parent parameter to AST Visitor.

This is preparatory to re-writing the identifier resolution logic.