for(map<string, VariableDeclaration *>::const_iterator i=stage.out_variables.begin(); i!=stage.out_variables.end(); ++i)
append(format("Output: %%%d %s %s", get_label(*i->second), i->second->type, i->first));
last_branch();
- visit(stage.content);
+ stage.content.visit(*this);
return formatted;
}
void DumpTree::visit(MemberAccess &memacc)
{
- annotated_branch(format("Member access: .%s", memacc.member), *memacc.left);
+ string text = "Member access:";
+ if(memacc.declaration)
+ text += format(" %%%d", get_label(*memacc.declaration));
+ text += format(" .%s", memacc.member);
+ annotated_branch(text, *memacc.left);
}
void DumpTree::visit(UnaryExpression &unary)
if(!var.init_expression)
last_branch();
if(var.array)
- annotated_branch("Array []", *var.array_size);
+ {
+ if(var.array_size)
+ annotated_branch("Array []", *var.array_size);
+ else
+ append("Array []");
+ }
last_branch();
if(var.init_expression)