mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 07:26:24 +02:00
fcl-passrc: pastree: Move option SemicolonAtEOL to new more generic class TPasImplCommandBase
git-svn-id: trunk@36622 -
This commit is contained in:
parent
99f7c010a8
commit
8225588722
@ -1105,25 +1105,29 @@ Type
|
|||||||
TPasImplElement = class(TPasElement)
|
TPasImplElement = class(TPasElement)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TPasImplCommandBase }
|
||||||
|
|
||||||
|
TPasImplCommandBase = class(TPasImplElement)
|
||||||
|
public
|
||||||
|
SemicolonAtEOL: boolean;
|
||||||
|
constructor Create(const AName: string; AParent: TPasElement); override;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TPasImplCommand - currently used as empty statement, e.g. if then else ; }
|
{ TPasImplCommand - currently used as empty statement, e.g. if then else ; }
|
||||||
|
|
||||||
TPasImplCommand = class(TPasImplElement)
|
TPasImplCommand = class(TPasImplCommandBase)
|
||||||
public
|
|
||||||
constructor Create(const AName: string; AParent: TPasElement); override;
|
|
||||||
public
|
public
|
||||||
Command: string; // never set by TPasParser
|
Command: string; // never set by TPasParser
|
||||||
SemicolonAtEOL: boolean;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TPasImplCommands - used by mkxmlrpc, not used by pparser }
|
{ TPasImplCommands - used by mkxmlrpc, not used by pparser }
|
||||||
|
|
||||||
TPasImplCommands = class(TPasImplElement)
|
TPasImplCommands = class(TPasImplCommandBase)
|
||||||
public
|
public
|
||||||
constructor Create(const AName: string; AParent: TPasElement); override;
|
constructor Create(const AName: string; AParent: TPasElement); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
public
|
public
|
||||||
Commands: TStrings;
|
Commands: TStrings;
|
||||||
SemicolonAtEOL: boolean;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TPasLabels }
|
{ TPasLabels }
|
||||||
@ -1524,9 +1528,9 @@ begin
|
|||||||
El:=nil;
|
El:=nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TPasImplCommand }
|
{ TPasImplCommandBase }
|
||||||
|
|
||||||
constructor TPasImplCommand.Create(const AName: string; AParent: TPasElement);
|
constructor TPasImplCommandBase.Create(const AName: string; AParent: TPasElement);
|
||||||
begin
|
begin
|
||||||
inherited Create(AName, AParent);
|
inherited Create(AName, AParent);
|
||||||
SemicolonAtEOL := true;
|
SemicolonAtEOL := true;
|
||||||
@ -2939,7 +2943,6 @@ constructor TPasImplCommands.Create(const AName: string; AParent: TPasElement);
|
|||||||
begin
|
begin
|
||||||
inherited Create(AName, AParent);
|
inherited Create(AName, AParent);
|
||||||
Commands := TStringList.Create;
|
Commands := TStringList.Create;
|
||||||
SemicolonAtEOL := true;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TPasImplCommands.Destroy;
|
destructor TPasImplCommands.Destroy;
|
||||||
|
Loading…
Reference in New Issue
Block a user