}
if(!var.precision.empty())
append(format("%s ", var.precision));
- append(format("%s %s", var.type, var.name));
+ string type_name = var.type_declaration->name;
+ if(var.array)
+ type_name = type_name.substr(0, type_name.find('['));
+ append(format("%s %s", type_name, var.name));
if(var.array)
{
append('[');
void Formatter::visit(FunctionDeclaration &func)
{
- append(format("%s %s(", func.return_type, func.name));
+ append(format("%s %s(", func.return_type_declaration->name, func.name));
for(NodeArray<VariableDeclaration>::iterator i=func.parameters.begin(); i!=func.parameters.end(); ++i)
{
if(i!=func.parameters.begin())