diff options
author | Roberto Raggi <[email protected]> | 2010-02-03 14:31:03 +0100 |
---|---|---|
committer | Roberto Raggi <[email protected]> | 2010-02-03 14:34:06 +0100 |
commit | 1f0b717ad2c6cd6bd4f7d70efa0bb6cc6f8f14be (patch) | |
tree | ac0168405aacd943c0858fbc2ee041694da71664 /src/libs/qmljs/qmljscheck.cpp | |
parent | 4038e16d247796fb6fd67f534c638789076522e6 (diff) |
Completion for global variables in JS.
* Support for lookup JS vs Qml
* Bind global variables.
Done-with: ckamm
Diffstat (limited to 'src/libs/qmljs/qmljscheck.cpp')
-rw-r--r-- | src/libs/qmljs/qmljscheck.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libs/qmljs/qmljscheck.cpp b/src/libs/qmljs/qmljscheck.cpp index 3d24f79054d..31b4567af3e 100644 --- a/src/libs/qmljs/qmljscheck.cpp +++ b/src/libs/qmljs/qmljscheck.cpp @@ -37,9 +37,9 @@ using namespace QmlJS; using namespace QmlJS::Interpreter; -Check::Check(Link *link) - : _engine(link->engine()), - _link(link), +Check::Check(Context *context) + : _engine(context->engine()), + _context(context), _scope(_engine->globalObject()), _result(0) { @@ -66,7 +66,7 @@ const Interpreter::Value *Check::check(AST::Node *ast) const Value *result = switchResult(previousResult); if (const Reference *ref = value_cast<const Reference *>(result)) - result = ref->value(_link->context()); + result = ref->value(_context); if (! result) result = _engine->undefinedValue(); @@ -165,7 +165,7 @@ bool Check::visit(AST::UiQualifiedId *ast) if (! ast->name) return false; - const Value *value = _link->lookup(ast->name->asString()); + const Value *value = _context->lookup(ast->name->asString()); if (! ast->next) { _result = value; @@ -213,7 +213,7 @@ bool Check::visit(AST::IdentifierExpression *ast) if (! ast->name) return false; - _result = _link->lookup(ast->name->asString()); + _result = _context->lookup(ast->name->asString()); return false; } |