forked from qt-creator/qt-creator
qmljs: update parser
Update the qtcreator qmljs parser to the one of Qt 5.12. It supports EcmaScript 7. Task-number: QTCREATORBUG-20341 Change-Id: I0d1cff71402ba17e22cde6b46c65614e162280de Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
This commit is contained in:
@@ -323,8 +323,8 @@ protected:
|
||||
|
||||
bool visit(UiPublicMember *ast)
|
||||
{
|
||||
if (ast->typeToken.isValid() && ast->isValid()) {
|
||||
if (m_scopeChain.context()->lookupType(m_scopeChain.document().data(), QStringList(ast->memberTypeName().toString())))
|
||||
if (ast->typeToken.isValid()) { // TODO: ast->isValid() ?
|
||||
if (m_scopeChain.context()->lookupType(m_scopeChain.document().data(), QStringList(ast->memberType->name.toString())))
|
||||
addUse(ast->typeToken, SemanticHighlighter::QmlTypeType);
|
||||
}
|
||||
if (ast->identifierToken.isValid())
|
||||
@@ -350,9 +350,10 @@ protected:
|
||||
return visit(static_cast<FunctionExpression *>(ast));
|
||||
}
|
||||
|
||||
bool visit(VariableDeclaration *ast)
|
||||
bool visit(PatternElement *ast)
|
||||
{
|
||||
processName(ast->name, ast->identifierToken);
|
||||
if (ast->isVariableDeclaration())
|
||||
processName(ast->bindingIdentifier, ast->identifierToken);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user