mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 10:59:24 +02:00
fcl-passrc: clean up
git-svn-id: trunk@46967 -
This commit is contained in:
parent
c1e700b3fe
commit
d5d9635cd9
@ -4196,11 +4196,11 @@ var
|
|||||||
{$ifdef UsePChar}
|
{$ifdef UsePChar}
|
||||||
OldLength: integer;
|
OldLength: integer;
|
||||||
Ch: Char;
|
Ch: Char;
|
||||||
|
LE: string[2];
|
||||||
{$else}
|
{$else}
|
||||||
s: string;
|
s: string;
|
||||||
l: integer;
|
l: integer;
|
||||||
{$endif}
|
{$endif}
|
||||||
LE : String{$ifdef fpc}[2]{$endif};
|
|
||||||
|
|
||||||
procedure FetchCurTokenString; inline;
|
procedure FetchCurTokenString; inline;
|
||||||
begin
|
begin
|
||||||
@ -4336,7 +4336,9 @@ begin
|
|||||||
Result := tkBraceOpen
|
Result := tkBraceOpen
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
{$ifdef UsePChar}
|
||||||
LE:=LineEnding;
|
LE:=LineEnding;
|
||||||
|
{$endif}
|
||||||
// Old-style multi-line comment
|
// Old-style multi-line comment
|
||||||
Inc(FTokenPos);
|
Inc(FTokenPos);
|
||||||
TokenStart := FTokenPos;
|
TokenStart := FTokenPos;
|
||||||
@ -4353,13 +4355,11 @@ begin
|
|||||||
SetLength(FCurTokenString, OldLength + SectionLength + length(LineEnding)); // Corrected JC
|
SetLength(FCurTokenString, OldLength + SectionLength + length(LineEnding)); // Corrected JC
|
||||||
if SectionLength > 0 then
|
if SectionLength > 0 then
|
||||||
Move(TokenStart^, FCurTokenString[OldLength + 1],SectionLength);
|
Move(TokenStart^, FCurTokenString[OldLength + 1],SectionLength);
|
||||||
|
|
||||||
// Corrected JC: Append the correct lineending
|
|
||||||
Inc(OldLength, SectionLength);
|
Inc(OldLength, SectionLength);
|
||||||
for Ch in LE do
|
for Ch in LE do
|
||||||
begin
|
begin
|
||||||
Inc(OldLength);
|
Inc(OldLength);
|
||||||
FCurTokenString[OldLength] := Ch;
|
FCurTokenString[OldLength] := Ch;
|
||||||
end;
|
end;
|
||||||
{$else}
|
{$else}
|
||||||
FCurTokenString:=FCurTokenString+copy(FCurLine,TokenStart,SectionLength)+LineEnding; // Corrected JC
|
FCurTokenString:=FCurTokenString+copy(FCurLine,TokenStart,SectionLength)+LineEnding; // Corrected JC
|
||||||
@ -4654,11 +4654,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
'{': // Multi-line comment
|
'{': // Multi-line comment
|
||||||
begin
|
begin
|
||||||
LE:=LineEnding;
|
|
||||||
Inc(FTokenPos);
|
Inc(FTokenPos);
|
||||||
TokenStart := FTokenPos;
|
TokenStart := FTokenPos;
|
||||||
FCurTokenString := '';
|
FCurTokenString := '';
|
||||||
{$ifdef UsePChar}
|
{$ifdef UsePChar}
|
||||||
|
LE:=LineEnding;
|
||||||
OldLength := 0;
|
OldLength := 0;
|
||||||
{$endif}
|
{$endif}
|
||||||
NestingLevel := 0;
|
NestingLevel := 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user