forked from qt-creator/qt-creator
QmlJS: Add small tweak to semantic highlighter
Check for enum key name starting upper case to avoid processing code that may match other cases as well. Task-number: QTCREATORBUG-19226 Change-Id: I07b62b492e2b220b7fbb3eb3fc2fb3136b554254 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -370,6 +370,8 @@ protected:
|
|||||||
|
|
||||||
bool visit(FieldMemberExpression *ast) override
|
bool visit(FieldMemberExpression *ast) override
|
||||||
{
|
{
|
||||||
|
if (ast->name.isEmpty() || ast->name.first().isLower())
|
||||||
|
return true;
|
||||||
// we only support IdentifierExpression.FieldMemberExpression (enum)
|
// we only support IdentifierExpression.FieldMemberExpression (enum)
|
||||||
const FieldMemberExpression *right = ast;
|
const FieldMemberExpression *right = ast;
|
||||||
if (const IdentifierExpression *idExp = cast<IdentifierExpression *>(ast->base)) {
|
if (const IdentifierExpression *idExp = cast<IdentifierExpression *>(ast->base)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user