-void NodeVisitor::visit(Assignment &assign)
-{
- visit(static_cast<BinaryExpression &>(assign));
-}
-
-
-void TraversingVisitor::visit(Block &block)
-{
- for(NodeList<Statement>::iterator i=block.body.begin(); i!=block.body.end(); ++i)
- (*i)->visit(*this);
-}
-
-void TraversingVisitor::visit(ParenthesizedExpression &parexpr)
-{
- parexpr.expression->visit(*this);
-}
-
-void TraversingVisitor::visit(MemberAccess &memacc)
-{
- memacc.left->visit(*this);
-}
-
-void TraversingVisitor::visit(UnaryExpression &unary)
-{
- unary.expression->visit(*this);
-}
-
-void TraversingVisitor::visit(BinaryExpression &binary)
-{
- binary.left->visit(*this);
- binary.right->visit(*this);
-}
-
-void TraversingVisitor::visit(FunctionCall &call)
-{
- for(NodeArray<Expression>::iterator i=call.arguments.begin(); i!=call.arguments.end(); ++i)
- (*i)->visit(*this);
-}
-
-void TraversingVisitor::visit(ExpressionStatement &expr)
-{
- expr.expression->visit(*this);
-}
-
-void TraversingVisitor::visit(InterfaceLayout &layout)
-{
- layout.layout.visit(*this);
-}
-
-void TraversingVisitor::visit(StructDeclaration &strct)
-{
- strct.members.visit(*this);
-}
-
-void TraversingVisitor::visit(VariableDeclaration &var)
-{
- if(var.layout)
- var.layout->visit(*this);
- if(var.init_expression)
- var.init_expression->visit(*this);
- if(var.array_size)
- var.array_size->visit(*this);
-}
-
-void TraversingVisitor::visit(InterfaceBlock &iface)
-{
- iface.members.visit(*this);
-}
-
-void TraversingVisitor::visit(FunctionDeclaration &func)
-{
- for(NodeArray<VariableDeclaration>::iterator i=func.parameters.begin(); i!=func.parameters.end(); ++i)
- (*i)->visit(*this);
- func.body.visit(*this);
-}
-
-void TraversingVisitor::visit(Conditional &cond)
-{
- cond.condition->visit(*this);
- cond.body.visit(*this);
- cond.else_body.visit(*this);
-}
-
-void TraversingVisitor::visit(Iteration &iter)
-{
- if(iter.init_statement)
- iter.init_statement->visit(*this);
- if(iter.condition)
- iter.condition->visit(*this);
- if(iter.loop_expression)
- iter.loop_expression->visit(*this);
- iter.body.visit(*this);
-}
-
-void TraversingVisitor::visit(Passthrough &pass)
-{
- if(pass.subscript)
- pass.subscript->visit(*this);
-}
-
-void TraversingVisitor::visit(Return &ret)
-{
- if(ret.expression)
- ret.expression->visit(*this);
-}
-
-
-Stage::Stage(StageType t):