diff options
Diffstat (limited to 'src/libs/qmljs/qmljslink.h')
-rw-r--r-- | src/libs/qmljs/qmljslink.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/libs/qmljs/qmljslink.h b/src/libs/qmljs/qmljslink.h index 1233412848f..8b622140ed0 100644 --- a/src/libs/qmljs/qmljslink.h +++ b/src/libs/qmljs/qmljslink.h @@ -19,14 +19,21 @@ namespace QmlJS { class QMLJS_EXPORT Link { public: + typedef QList<const Interpreter::ObjectValue *> ScopeChain; + +public: // Link all documents in snapshot reachable from doc. Link(Document::Ptr doc, const Snapshot &snapshot, Interpreter::Engine *interp); ~Link(); Interpreter::Context *context(); + ScopeChain scopeChain() const; + Interpreter::Engine *engine(); // Get the scope chain for the currentObject inside doc. - Interpreter::ObjectValue *scopeChainAt(Document::Ptr doc, AST::Node *currentObject); + void scopeChainAt(Document::Ptr doc, AST::Node *currentObject); + + const Interpreter::Value *lookup(const QString &name) const; private: static QList<Document::Ptr> reachableDocuments(Document::Ptr startDoc, const Snapshot &snapshot); @@ -48,6 +55,7 @@ private: Interpreter::Context _context; QList<Document::Ptr> _docs; QHash<Document *, Interpreter::ObjectValue *> _typeEnvironments; + ScopeChain _scopeChain; }; } // namespace QmlJS |