mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 06:49:27 +02:00
fcl-passrc: new option SemicolonAtEOL for better control of TPasImplCommands (previously, semicolon was implicitly added for each line for generated pascal code by paswrite.pp module for TPasImplCommands)
git-svn-id: trunk@36619 -
This commit is contained in:
parent
2d8313165d
commit
aaf7f5137e
@ -1120,6 +1120,7 @@ Type
|
||||
destructor Destroy; override;
|
||||
public
|
||||
Commands: TStrings;
|
||||
SemicolonAtEOL: boolean;
|
||||
end;
|
||||
|
||||
{ TPasLabels }
|
||||
@ -2927,6 +2928,7 @@ constructor TPasImplCommands.Create(const AName: string; AParent: TPasElement);
|
||||
begin
|
||||
inherited Create(AName, AParent);
|
||||
Commands := TStringList.Create;
|
||||
SemicolonAtEOL := true;
|
||||
end;
|
||||
|
||||
destructor TPasImplCommands.Destroy;
|
||||
|
@ -516,7 +516,10 @@ begin
|
||||
if (Length(s) >= 2) and (s[1] = '/') and (s[2] = '/') then
|
||||
wrtln(s)
|
||||
else
|
||||
wrtln(s + ';');
|
||||
if ACommands.SemicolonAtEOL then
|
||||
wrtln(s + ';')
|
||||
else
|
||||
wrtln(s);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user