Add a reference to the parent to each node in the AST