forked from qt-creator/qt-creator
Get rid of Environment, introduce external ScopeChain in Link.
Done-with: Roberto
This commit is contained in:
@@ -18,15 +18,22 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user