virtual void visit(Literal &) { }
virtual void visit(ParenthesizedExpression &) { }
virtual void visit(VariableReference &) { }
+ virtual void visit(InterfaceBlockReference &) { }
virtual void visit(MemberAccess &) { }
virtual void visit(UnaryExpression &) { }
virtual void visit(BinaryExpression &) { }
TraversingVisitor(): current_block(0) { }
public:
+ virtual void enter(Block &) { }
virtual void visit(Block &);
virtual void visit(ParenthesizedExpression &);
virtual void visit(MemberAccess &);
private:
Stage *stage;
const std::set<Node *> *to_remove;
- std::vector<Block *> blocks;
- bool anonymous;
bool recursive_remove;
public:
void apply(Stage &, const std::set<Node *> &);
private:
- void remove_variable(std::map<std::string, VariableDeclaration *> &, VariableDeclaration &);
+ template<typename T>
+ void remove_from_map(std::map<std::string, T *> &, const std::string &, T &);
virtual void visit(Block &);
virtual void visit(StructDeclaration &);