@@ -388,15 +388,15 @@ class Colorizer : DisposingComObject, IVsColorizer, ConfigModifiedListener
388
388
type = TokenColor.Keyword;
389
389
}
390
390
391
- if (type == TokenColor.Identifier)
392
- type = mSource.getIdentifierColor(tok, iLine + 1 , prevpos);
393
-
394
391
if (cov >= 0 )
395
392
{
396
393
type = covtype;
397
394
}
398
395
else
399
396
{
397
+ if (type == TokenColor.Identifier)
398
+ type = mSource.getIdentifierColor(tok, iLine + 1 , prevpos);
399
+
400
400
if (mColorizeVersions)
401
401
{
402
402
if (Lexer.isCommentOrSpace(type, tok) || (inTokenString || nowInTokenString))
@@ -888,6 +888,13 @@ class Colorizer : DisposingComObject, IVsColorizer, ConfigModifiedListener
888
888
return type;
889
889
}
890
890
891
+ // anything that originates from TokenColor.Identifier
892
+ bool isIdentifierColorType (int type)
893
+ {
894
+ int sct = stringColorType(type);
895
+ return sct == TokenColor.StringIdentifier || sct == TokenColor.DisabledIdentifier;
896
+ }
897
+
891
898
__gshared int [wstring ] asmIdentifiers;
892
899
static const wstring [] asmKeywords = [ " __LOCAL_SIZE" , " dword" , " even" , " far" , " naked" , " near" , " ptr" , " qword" , " seg" , " word" , ];
893
900
static const wstring [] asmRegisters = [
@@ -1220,13 +1227,13 @@ class Colorizer : DisposingComObject, IVsColorizer, ConfigModifiedListener
1220
1227
case VersionParseState.InAsmBlockEnabled:
1221
1228
if (text == " }" )
1222
1229
parseState = VersionParseState.IdleEnabled;
1223
- else if (ntype == TokenColor.Identifier )
1230
+ else if (isIdentifierColorType( ntype) )
1224
1231
ntype = asmColorType(text);
1225
1232
break ;
1226
1233
case VersionParseState.InAsmBlockDisabled:
1227
1234
if (text == " }" )
1228
1235
parseState = VersionParseState.IdleDisabled;
1229
- else if (ntype == TokenColor.Identifier )
1236
+ else if (isIdentifierColorType( ntype) )
1230
1237
ntype = asmColorType(text);
1231
1238
goto case VersionParseState.IdleDisabled;
1232
1239
}
0 commit comments