Skip to content
Snippets Groups Projects
Commit 41bc5dac authored by Erik Verbruggen's avatar Erik Verbruggen
Browse files

Added a utility method to search by line/column.

parent 3eee397a
No related branches found
No related tags found
No related merge requests found
...@@ -40,6 +40,7 @@ using namespace CPlusPlus; ...@@ -40,6 +40,7 @@ using namespace CPlusPlus;
QList<AST *> ASTPath::operator()(int line, int column) QList<AST *> ASTPath::operator()(int line, int column)
{ {
qDebug()<<"path @" << line << column;
_nodes.clear(); _nodes.clear();
_line = line + 1; _line = line + 1;
_column = column + 1; _column = column + 1;
......
...@@ -53,6 +53,7 @@ public: ...@@ -53,6 +53,7 @@ public:
QList<AST *> operator()(const QTextCursor &cursor) QList<AST *> operator()(const QTextCursor &cursor)
{ return this->operator()(cursor.blockNumber(), cursor.columnNumber()); } { return this->operator()(cursor.blockNumber(), cursor.columnNumber()); }
/// line and column are 0-based!
QList<AST *> operator()(int line, int column); QList<AST *> operator()(int line, int column);
#ifdef DEBUG_AST_PATH #ifdef DEBUG_AST_PATH
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment