QmlJS highlighter: Highlight name after 'as' in imports.

Also fix a problem with the scope not being updated after initial
construction.

Change-Id: If5cf70bb029857b317ebbee3a6c4ee421213f24c
Reviewed-on: http://codereview.qt-project.org/6115
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
This commit is contained in:
Christian Kamm
2011-09-30 15:04:45 +02:00
parent e0f24bb545
commit 8c8f5270c2

View File

@@ -265,6 +265,12 @@ protected:
addUse(fullLocationForQualifiedId(localId), SemanticHighlighter::BindingNameType); addUse(fullLocationForQualifiedId(localId), SemanticHighlighter::BindingNameType);
} }
bool visit(UiImport *ast)
{
processName(ast->importId, ast->importIdToken);
return true;
}
bool visit(UiObjectDefinition *ast) bool visit(UiObjectDefinition *ast)
{ {
if (m_scopeChain.document()->bind()->isGroupedPropertyBinding(ast)) { if (m_scopeChain.document()->bind()->isGroupedPropertyBinding(ast)) {