[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Walking the tree



Is there a generic way to walk the tree?

As I go through the tree, I create snippets of code. But the code I create
for an expression, say is done before I create the code for the function
header that contains it (as an example)

So, I would like to generate the code using something setOut(Node)...and
then run through the tree again, although not in depth first, and dump out
the code.

However, I'd like to not have to write indvidual visit methods for each node
(outXXX)...

Or is there a better way to do this?

Thanx!

Will Hartung
(willh@msoft.com)