mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 00:11:51 +02:00
SynEdit: Pas Highlighter, fix param modifier (const/var/...) for "operator". Issue #40147 Also fixed flags, for "class operator" in records.
This commit is contained in:
parent
2370514713
commit
00bd7c0598
@ -2186,6 +2186,8 @@ begin
|
||||
end;
|
||||
|
||||
function TSynPasSyn.Func108: TtkTokenKind;
|
||||
var
|
||||
InClass: Boolean;
|
||||
begin
|
||||
if KeyComp('Operator') then
|
||||
begin
|
||||
@ -2195,10 +2197,16 @@ begin
|
||||
CloseBeginEndBlocksBeforeProc;
|
||||
if TopPascalCodeFoldBlockType in [cfbtVarType, cfbtLocalVarType] then
|
||||
EndPascalCodeFoldBlockLastLine;
|
||||
if ((rsImplementation in fRange) and
|
||||
not(TopPascalCodeFoldBlockType in [cfbtClass, cfbtClassSection, cfbtRecord])) then
|
||||
|
||||
InClass := TopPascalCodeFoldBlockType in [{cfbtClass,} cfbtClassSection, cfbtRecord]; // only in records
|
||||
if ( (rsImplementation in fRange) and (not InClass) ) then
|
||||
StartPascalCodeFoldBlock(cfbtProcedure);
|
||||
|
||||
if InClass then
|
||||
fRange := fRange + [rsAfterClassMembers];
|
||||
//fRange := fRange + [rsAtProcName];
|
||||
end;
|
||||
fRange := fRange + [rsInProcHeader];
|
||||
Result := tkKey;
|
||||
end
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user