virtual void visit(Return &);
};
-/** Gathers nodes of a particular type from the syntax tree. */
-template<typename T>
-class NodeGatherer: private TraversingVisitor
-{
-private:
- std::vector<T *> nodes;
-
-public:
- const std::vector<T *> &apply(Stage &s) { s.content.visit(*this); return nodes; }
-
-private:
- virtual void visit(T &n) { nodes.push_back(&n); }
-};
-
/** Removes a set of nodes from the syntax tree. */
class NodeRemover: private TraversingVisitor
{