mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 09:56:12 +02:00
implemented freepascal highlighter with nested comments for (* comments
git-svn-id: trunk@9602 -
This commit is contained in:
parent
25cfb2b746
commit
b399abb1a0
@ -1470,16 +1470,27 @@ begin
|
||||
{$IFDEF SYN_LAZARUS}
|
||||
fTokenID := tkComment;
|
||||
repeat
|
||||
if fLine[Run]=#0 then break;
|
||||
if (fLine[Run] = '*') and (Run<fLineLen) and (fLine[Run + 1] = ')') then
|
||||
begin
|
||||
if fLine[Run]=#0 then
|
||||
break
|
||||
else if (fLine[Run] = '*') and (Run<fLineLen) and (fLine[Run + 1] = ')')
|
||||
then begin
|
||||
Inc(Run, 2);
|
||||
if TopPascalCodeFoldBlockType=cfbtNestedComment then begin
|
||||
EndCodeFoldBlock;
|
||||
end else begin
|
||||
if fRange = rsAnsiAsm then
|
||||
fRange := rsAsm
|
||||
else
|
||||
fRange := rsUnKnown;
|
||||
break;
|
||||
end;
|
||||
end
|
||||
else if NestedComments
|
||||
and (fLine[Run] = '(') and (Run<fLineLen) and (fLine[Run + 1] = '*') then
|
||||
begin
|
||||
Inc(Run,2);
|
||||
StartPascalCodeFoldBlock(cfbtNestedComment);
|
||||
end else
|
||||
Inc(Run);
|
||||
until (Run>fLineLen) or (fLine[Run] in [#0, #10, #13]);
|
||||
{$ELSE}
|
||||
|
Loading…
Reference in New Issue
Block a user