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:
maciej-izak 2017-06-30 13:35:24 +00:00
parent 2d8313165d
commit aaf7f5137e
2 changed files with 6 additions and 1 deletions

View File

@ -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;

View File

@ -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;