SynEdit: Pas-Highlighter, deprecated after class

git-svn-id: trunk@29140 -
This commit is contained in:
martin 2011-01-20 13:57:13 +00:00
parent 4f21afddf1
commit d9b3de392f
2 changed files with 16 additions and 0 deletions

View File

@ -1005,6 +1005,9 @@ begin
else
if TopPascalCodeFoldBlockType = cfbtRecord then
EndPascalCodeFoldBlock;
// After type declaration, allow "deprecated"?
if TopPascalCodeFoldBlockType in [cfbtVarType, cfbtLocalVarType] then
fRange := fRange + [rsVarTypeInSpecification];
end;
{$ENDIF}
end else begin

View File

@ -716,6 +716,19 @@ procedure TTestHighlighterPas.TestContextForDeprecated;
tkSpace, tkIdentifier, tkSpace, tkKey {the one and only}, tkSymbol]);
// after class declaration
SetLines
([ 'Unit A; interface',
'type',
'TFoo=class',
'foo: Integer;',
'end '+s+';',
''
]);
CheckTokensForLine('after class declaration', 4,
[tkKey, tkSpace, tkKey, tkSymbol]);
PopBaseName;
end;
begin