Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] AST traversal

Hi,
 
I noticed that ASTNode.accept() and ASTVisitor.visit() together provide a top-down traversal of the AST. I am wondering whether there is a way to traverse the AST from bottom-up without modifying the current code? I have thought to associate each node a "property", and during the traversal change the parent node's property of the currently visited node. However, I cannot find any appropriate place to store this "property". Anybody can give me some hint?
 
Thanks,
 
Yuan 

Back to the top