pycparser
pycparser copied to clipboard
Get the parent node when overriding the 'c_ast.NodeVisitor'
How could i get the parent node when overriding the 'c_ast.NodeVisitor'. The subclasses of 'Node' have 'children' an attribute. But sometimes i need link to the parent node. Is there any possible solutions?
Please refer to this FAQ: https://github.com/eliben/pycparser/wiki/FAQ#why-dont-ast-nodes-in-pycparser-have-parent-links