fix #229 - `class` not highlighted correctly when contiguous to a right curly bracket

This commit is contained in:
Basile Burg 2018-02-05 04:32:34 +01:00
parent ee4b928c8c
commit 382ae6c7bd
2 changed files with 4 additions and 3 deletions

View File

@ -840,7 +840,7 @@ begin
EndCodeFoldBlock(fkBrackets in fFoldKinds);
if (reader^ = '}') and (rkAsm in fCurrRange.rangeKinds) then
fCurrRange.rangeKinds -= [rkAsm]; ;
if (reader+1)^ in stringPostfixes then
if ((reader+1)^ in stringPostfixes) and not isIdentifier((reader+2)^) then
readerNext;
end;
end;

View File

@ -815,8 +815,9 @@ begin
begin
reader.saveBeginning;
identifier += reader.head^;
if (reader.head^ = '}') and ((reader.head + 1)^ in stringPostfixes) then
reader.Next;
if (reader.head^ = '}') and ((reader.head + 1)^ in stringPostfixes) and not
isIdentifier((reader.head + 2)^) then
reader.Next;
reader.Next;
addToken(ltkSymbol);
if callBackDoStop then