next up previous
Next: Walker subclass definitions Up: Walkers Previous: Definition of a Walker

Walkers are Easy to Use

The Walker class uses the virtual dispatch of C++ to make this traversal easy: instead of defining what you want to happen for every single node type, you need only specify actions for the node types you're interested in; all other nodes have a default action (i.e., nothing) performed on them. You specify your actions by overriding the at_-functions of Walker. There is one at_-function for each C-Breeze node type, e.g., at_for, at_decl, etc.



Calvin Lin
2002-01-31