Added parent linking to AST code