Implement function to get the QmlJS AST path to a given location.

Will be useful for improved scope chain building.
This commit is contained in:
Christian Kamm
2010-02-19 10:16:33 +01:00
parent c289897351
commit 8274197366
2 changed files with 18 additions and 0 deletions

View File

@@ -115,6 +115,9 @@ public:
// Returns the AST node under cursor
QmlJS::AST::Node *nodeUnderCursor(int cursorPosition) const;
// Returns the list of nodes that enclose the given position.
QList<QmlJS::AST::Node *> astPath(int cursorPosition) const;
public: // attributes
QmlJS::Document::Ptr document;
QmlJS::Snapshot snapshot;