synedit: limit 'sealed', 'final', 'abstract' highlighting to the sections where they are keywords

git-svn-id: trunk@22479 -
This commit is contained in:
paul 2009-11-07 15:12:57 +00:00
parent 8838a2c5fd
commit ceafb0bc53

View File

@ -1059,7 +1059,8 @@ function TSynPasSyn.Func42: TtkTokenKind;
begin
if KeyComp('Alias') then
Result := tkKey
else if KeyComp('Final') then
else
if KeyComp('Final') and (TopPascalCodeFoldBlockType in [cfbtClassSection]) then
Result := tkKey
else
Result := tkIdentifier;
@ -1082,7 +1083,7 @@ end;
function TSynPasSyn.Func46: TtkTokenKind;
begin
if KeyComp('Sealed') then
if KeyComp('Sealed') and (TopPascalCodeFoldBlockType in [cfbtClass]) then
Result := tkKey
else
Result := tkIdentifier;
@ -1345,7 +1346,7 @@ end;
function TSynPasSyn.Func84: TtkTokenKind;
begin
if KeyComp('Abstract') then
if KeyComp('Abstract') and (TopPascalCodeFoldBlockType in [cfbtClass, cfbtClassSection]) then
Result := tkKey
else
Result := tkIdentifier;