}
-StageVisitor::StageVisitor():
- stage(0)
-{ }
-
-void StageVisitor::apply(Stage &s)
-{
- SetForScope<Stage *> set(stage, &s);
- stage->content.visit(*this);
-}
-
-
BlockModifier::BlockModifier():
remove_node(false)
{ }
NodeRemover::NodeRemover(const set<Node *> &r):
+ stage(0),
to_remove(r)
{ }
+void NodeRemover::apply(Stage &s)
+{
+ SetForScope<Stage *> set_stage(stage, &s);
+ visit(s.content);
+}
+
void NodeRemover::visit(Block &block)
{
for(NodeList<Statement>::iterator i=block.body.begin(); i!=block.body.end(); )