diff options
author | Christian Kamm <[email protected]> | 2011-07-12 14:55:27 +0200 |
---|---|---|
committer | Christian Kamm <[email protected]> | 2011-08-08 12:05:03 +0200 |
commit | f87dc6198609abdb58b430cf272a4e6ca7144865 (patch) | |
tree | 738d7024efedab5254676139ca456631e334c78a /src/libs/qmljs/qmljslookupcontext.h | |
parent | ed1321a4f95d4ecbbd96794ec355cfc7984cfb2d (diff) |
QmlJS: Split Context and ScopeChain.
Context is created by Link and has information about imports
for all Documents in a Snapshot.
ScopeChain represents how lookup is done at a specific place in
a Document.
Change-Id: I874102d57bbaf1a497fa3f27633bed6ee75dcf10
Reviewed-on: http://codereview.qt.nokia.com/1694
Reviewed-by: Fawzi Mohamed <[email protected]>
Diffstat (limited to 'src/libs/qmljs/qmljslookupcontext.h')
-rw-r--r-- | src/libs/qmljs/qmljslookupcontext.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libs/qmljs/qmljslookupcontext.h b/src/libs/qmljs/qmljslookupcontext.h index ce4199e0921..f71ae802847 100644 --- a/src/libs/qmljs/qmljslookupcontext.h +++ b/src/libs/qmljs/qmljslookupcontext.h @@ -47,6 +47,7 @@ class LookupContextData; namespace Interpreter { class Value; class Context; +class ScopeChain; } class QMLJS_EXPORT LookupContext @@ -55,7 +56,7 @@ class QMLJS_EXPORT LookupContext LookupContext(const Document::Ptr doc, const Snapshot &snapshot, const QList<AST::Node *> &path); LookupContext(const Document::Ptr doc, - const Interpreter::Context &linkedContextWithoutScope, + const Interpreter::Context &context, const QList<AST::Node *> &path); public: @@ -67,7 +68,7 @@ public: static Ptr create(const Document::Ptr doc, const Snapshot &snapshot, const QList<AST::Node *> &path); static Ptr create(const Document::Ptr doc, - const Interpreter::Context &linkedContextWithoutScope, + const Interpreter::Context &context, const QList<AST::Node *> &path); const Interpreter::Value *evaluate(AST::Node *node) const; @@ -76,6 +77,7 @@ public: Snapshot snapshot() const; Interpreter::ValueOwner *valueOwner() const; const Interpreter::Context *context() const; + const Interpreter::ScopeChain &scopeChain() const; private: QScopedPointer<LookupContextData> d; |