mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 19:10:14 +02:00
* Disable result, explicit list cmmand-line argument
This commit is contained in:
parent
21f57606a6
commit
1d7e346831
@ -85,6 +85,9 @@ function TSkelEngine.CreateElement(AClass: TPTreeElement; const AName: String;
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
Result:=Assigned(AParent) and (Length(AName) > 0) and
|
Result:=Assigned(AParent) and (Length(AName) > 0) and
|
||||||
|
(not aPasElement.InheritsFrom(TPasUnresolvedTypeRef)) and
|
||||||
|
(not aPasElement.InheritsFrom(TPasUnresolvedUnitRef)) and
|
||||||
|
(not aPasElement.InheritsFrom(TPasUsesUnit)) and
|
||||||
(not DisableArguments or ((APasElement.ClassType <> TPasArgument) and (not (aParent is TPasArgument)))) and
|
(not DisableArguments or ((APasElement.ClassType <> TPasArgument) and (not (aParent is TPasArgument)))) and
|
||||||
(not DisableFunctionResults or (APasElement.ClassType <> TPasResultElement)) and
|
(not DisableFunctionResults or (APasElement.ClassType <> TPasResultElement)) and
|
||||||
(not DisablePrivate or (AVisibility<>visPrivate)) and
|
(not DisablePrivate or (AVisibility<>visPrivate)) and
|
||||||
@ -109,6 +112,7 @@ begin
|
|||||||
Writeln(' --disable-arguments Do not check function arguments.');
|
Writeln(' --disable-arguments Do not check function arguments.');
|
||||||
Writeln(' --disable-private Do not check class private fields.');
|
Writeln(' --disable-private Do not check class private fields.');
|
||||||
Writeln(' --disable-protected Do not check class protected fields.');
|
Writeln(' --disable-protected Do not check class protected fields.');
|
||||||
|
Writeln(' --disable-result Do not check Function results.');
|
||||||
Writeln(' --input=cmdline Input file to create skeleton for. Specify twice, once for each file.');
|
Writeln(' --input=cmdline Input file to create skeleton for. Specify twice, once for each file.');
|
||||||
Writeln(' Use options as for compiler.');
|
Writeln(' Use options as for compiler.');
|
||||||
Writeln(' --lang=language Use selected language.');
|
Writeln(' --lang=language Use selected language.');
|
||||||
@ -139,10 +143,14 @@ begin
|
|||||||
CmdLineAction := actionHelp
|
CmdLineAction := actionHelp
|
||||||
else if s = '--disable-arguments' then
|
else if s = '--disable-arguments' then
|
||||||
DisableArguments := True
|
DisableArguments := True
|
||||||
|
else if s = '--disable-result' then
|
||||||
|
DisableFunctionResults:=True
|
||||||
else if s = '--disable-private' then
|
else if s = '--disable-private' then
|
||||||
DisablePrivate := True
|
DisablePrivate := True
|
||||||
else if s = '--sparse' then
|
else if s = '--sparse' then
|
||||||
SparseList := True
|
SparseList := True
|
||||||
|
else if s = '--list' then
|
||||||
|
cmdLineAction := ActionList
|
||||||
else if s = '--disable-protected' then
|
else if s = '--disable-protected' then
|
||||||
begin
|
begin
|
||||||
DisableProtected := True;
|
DisableProtected := True;
|
||||||
@ -240,8 +248,8 @@ begin
|
|||||||
For I:=0 to List.Count-1 do
|
For I:=0 to List.Count-1 do
|
||||||
begin
|
begin
|
||||||
If Not SparseList then
|
If Not SparseList then
|
||||||
Write(GetTypeDescription(TPasElement(List.Objects[i])),' : ');
|
Write(F,GetTypeDescription(TPasElement(List.Objects[i])),' : ');
|
||||||
Writeln(List[i]);
|
Writeln(F,List[i]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user