QmlJS: Also bind FunctionExpressions.

Reviewed-by: Erik Verbruggen
This commit is contained in:
Christian Kamm
2010-11-16 13:53:39 +01:00
parent a89ec50861
commit 6c9f32ba60
4 changed files with 16 additions and 10 deletions

View File

@@ -106,7 +106,7 @@ bool Bind::usesQmlPrototype(ObjectValue *prototype,
return false;
}
Interpreter::ObjectValue *Bind::findFunctionScope(AST::FunctionDeclaration *node) const
Interpreter::ObjectValue *Bind::findFunctionScope(AST::FunctionExpression *node) const
{
return _functionScopes.value(node);
}
@@ -278,7 +278,7 @@ bool Bind::visit(UiScriptBinding *ast)
_idEnvironment->setProperty(i->name->asString(), _currentObjectValue);
}
return false;
return true;
}
bool Bind::visit(UiArrayBinding *)
@@ -298,7 +298,7 @@ bool Bind::visit(VariableDeclaration *ast)
return false;
}
bool Bind::visit(FunctionDeclaration *ast)
bool Bind::visit(FunctionExpression *ast)
{
if (!ast->name)
return false;
@@ -341,3 +341,8 @@ bool Bind::visit(FunctionDeclaration *ast)
return false;
}
bool Bind::visit(FunctionDeclaration *ast)
{
return visit(static_cast<FunctionExpression *>(ast));
}