next up previous
Next: A Sample Changer Up: Changers Previous: How Changers Work

Changer subclass definitions

A changer is defined almost the same way that a walker is. The constructor for Changer, which should be called by the constructor for the subclass, takes three parameters. The first two, the order and depth, are the same as the ones for Walker. The third is a bool that, if true, causes the new Changer subclass, when traversing the AST, to delete nodes that have been replaced with new nodes in the AST by the changer.



Calvin Lin
2002-01-31