string text;
if(iface.declaration)
text += format("%%%d ", get_label(*iface.declaration));
- text += format("%s (iface)", iface.name);
+ text += format("%s (iface) -> %s", iface.name, format_type(iface.type));
append(text);
}
annotated_branch(text, *memacc.left);
}
+void DumpTree::visit(Swizzle &swizzle)
+{
+ static const char components[4] = { 'x', 'y', 'z', 'w' };
+ string text = "Swizzle: .";
+ for(unsigned i=0; i<swizzle.count; ++i)
+ text += components[swizzle.components[i]];
+ text += format(" -> %s", format_type(swizzle.type));
+ annotated_branch(text, *swizzle.left);
+}
+
void DumpTree::visit(UnaryExpression &unary)
{
string text = format("Unary: %s, %sfix -> %s", unary.oper->token, (unary.oper->type==Operator::PREFIX ? "pre" : "post"), format_type(unary.type));
head += " (builtin)";
else if(block.linked_block)
head += " (linked)";
- annotated_branch(head, block.members);
+ append(head);
+
+ begin_sub();
+ last_branch();
+ if(block.type_declaration)
+ append(format("Type: %%%d %s", get_label(*block.type_declaration), block.type_declaration->name));
+ else if(block.members)
+ block.members->visit(*this);
+ end_sub();
}
void DumpTree::visit(FunctionDeclaration &func)