summaryrefslogtreecommitdiff
path: root/shared/cplusplus/PrettyPrinter.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <qtc-committer@nokia.com>2009-01-05 16:10:56 +0100
committerRoberto Raggi <qtc-committer@nokia.com>2009-01-05 16:10:56 +0100
commitab474061a6de718620b3756cbcbbd7bf8ecce29b (patch)
tree36b17ba16a3d767e07f8a28ec4bcec66cdb71b36 /shared/cplusplus/PrettyPrinter.cpp
parent129a807f21513b7d2cc90e08603622c678075100 (diff)
downloadqt-creator-ab474061a6de718620b3756cbcbbd7bf8ecce29b.tar.gz
Pretty print declarator list.
Diffstat (limited to 'shared/cplusplus/PrettyPrinter.cpp')
-rw-r--r--shared/cplusplus/PrettyPrinter.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/shared/cplusplus/PrettyPrinter.cpp b/shared/cplusplus/PrettyPrinter.cpp
index ab086cb74c..213d21a468 100644
--- a/shared/cplusplus/PrettyPrinter.cpp
+++ b/shared/cplusplus/PrettyPrinter.cpp
@@ -35,7 +35,6 @@
#include "AST.h"
#include <iostream>
#include <string>
-#include <assert.h>
CPLUSPLUS_USE_NAMESPACE
@@ -385,9 +384,13 @@ bool PrettyPrinter::visit(DeclaratorIdAST *ast)
return false;
}
-bool PrettyPrinter::visit(DeclaratorListAST *)
+bool PrettyPrinter::visit(DeclaratorListAST *ast)
{
- assert(0);
+ for (DeclaratorListAST *it = ast; it; it = it->next) {
+ accept(it->declarator);
+ if (it->next)
+ out << ", ";
+ }
return false;
}