It's causing some trouble when the base class version is called for an
assignment and it gets handled as a binary expression. Almost all classes
are handling the two separately anyway.
virtual void visit(Block &);
virtual void visit(UnaryExpression &);
virtual void visit(BinaryExpression &);
+ virtual void visit(Assignment &a) { visit(static_cast<BinaryExpression &>(a)); }
virtual void visit(MemberAccess &);
virtual void visit(FunctionCall &);
virtual void visit(ExpressionStatement &);
void TraversingVisitor::visit(Assignment &assign)
{
- visit(static_cast<BinaryExpression &>(assign));
+ assign.left->visit(*this);
+ assign.right->visit(*this);
}
void TraversingVisitor::visit(FunctionCall &call)