pycparser icon indicating copy to clipboard operation
pycparser copied to clipboard

Get the parent node when overriding the 'c_ast.NodeVisitor'

Open wangcong15 opened this issue 10 years ago • 1 comments

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?

wangcong15 avatar Aug 14 '16 07:08 wangcong15

Please refer to this FAQ: https://github.com/eliben/pycparser/wiki/FAQ#why-dont-ast-nodes-in-pycparser-have-parent-links

eliben avatar Aug 14 '16 23:08 eliben