Commit 7d679593 authored by Christian Kamm's avatar Christian Kamm

QmlJS: Add UiScriptBinding range if it has a script block.

Makes completion in code bindings have the right scope.

Change-Id: Ib76840cf7be5ab0a3c573e9ad087359816a9ced6
Reviewed-on: http://codereview.qt.nokia.com/1046Reviewed-by: default avatarRoberto Raggi <roberto.raggi@nokia.com>
parent e2ea5a84
......@@ -407,6 +407,14 @@ protected:
return true;
}
virtual bool visit(AST::UiScriptBinding *ast)
{
if (AST::Block *block = AST::cast<AST::Block *>(ast->statement)) {
_ranges.append(createRange(ast, block));
}
return true;
}
Range createRange(AST::UiObjectMember *member, AST::UiObjectInitializer *ast)
{
return createRange(member, member->firstSourceLocation(), ast->rbraceToken);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment