Added a utility method to search by line/column.

This commit is contained in:
Erik Verbruggen
2010-05-28 16:23:31 +02:00
parent 3eee397abd
commit 41bc5dac15
2 changed files with 2 additions and 0 deletions

View File

@@ -40,6 +40,7 @@ using namespace CPlusPlus;
QList<AST *> ASTPath::operator()(int line, int column)
{
qDebug()<<"path @" << line << column;
_nodes.clear();
_line = line + 1;
_column = column + 1;

View File

@@ -53,6 +53,7 @@ public:
QList<AST *> operator()(const QTextCursor &cursor)
{ return this->operator()(cursor.blockNumber(), cursor.columnNumber()); }
/// line and column are 0-based!
QList<AST *> operator()(int line, int column);
#ifdef DEBUG_AST_PATH