namespace GL {
namespace SL {
-void NodeVisitor::visit(Assignment &assign)
-{
- visit(static_cast<BinaryExpression &>(assign));
-}
-
-
void TraversingVisitor::visit(Block &block)
{
if(&block!=current_block)
binary.right->visit(*this);
}
+void TraversingVisitor::visit(Assignment &assign)
+{
+ visit(static_cast<BinaryExpression &>(assign));
+}
+
void TraversingVisitor::visit(FunctionCall &call)
{
for(NodeArray<Expression>::iterator i=call.arguments.begin(); i!=call.arguments.end(); ++i)
iter.init_statement->visit(*this);
if(iter.condition)
iter.condition->visit(*this);
+ iter.body.visit(*this);
if(iter.loop_expression)
iter.loop_expression->visit(*this);
- iter.body.visit(*this);
}
void TraversingVisitor::visit(Passthrough &pass)
}
}
-void NodeRemover::visit(StructDeclaration &strct)
+void NodeRemover::visit(TypeDeclaration &type)
{
- if(to_remove->count(&strct))
- remove_from_map(stage->types, strct.name, strct);
+ if(to_remove->count(&type))
+ remove_from_map(stage->types, type.name, type);
}
void NodeRemover::visit(VariableDeclaration &var)
{
if(to_remove->count(&iface))
{
- remove_from_map(stage->interface_blocks, iface.name, iface);
+ remove_from_map(stage->interface_blocks, iface.interface+iface.name, iface);
if(!iface.instance_name.empty())
- remove_from_map(stage->interface_blocks, iface.instance_name, iface);
+ remove_from_map(stage->interface_blocks, "_"+iface.instance_name, iface);
}
SetFlag set_recursive(recursive_remove, recursive_remove || to_remove->count(&iface));
TraversingVisitor::visit(iface);