Added a dump method to the ASTPath.

This commit is contained in:
Erik Verbruggen
2009-12-29 18:35:30 +01:00
parent 8d8312a427
commit 99bc0bc672

View File

@@ -70,6 +70,13 @@ public:
return _nodes;
}
static void dump(const QList<AST *> nodes)
{
qDebug() << "ASTPath dump," << nodes.size() << "nodes:";
for (int i = 0; i < nodes.size(); ++i)
qDebug() << qPrintable(QString(i + 1, QLatin1Char('-'))) << typeid(*nodes.at(i)).name();
}
protected:
virtual bool preVisit(AST *ast)
{