mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-16 01:50:38 +01:00
fcl-passrc: paswrite: allow to write procedure type
git-svn-id: trunk@37059 -
This commit is contained in:
parent
2e37c05f23
commit
597cf52a3a
@ -49,6 +49,7 @@ type
|
||||
procedure WriteSection(ASection: TPasSection);
|
||||
procedure WriteClass(AClass: TPasClassType);
|
||||
procedure WriteVariable(AVar: TPasVariable);
|
||||
procedure WriteProcType(AProc: TPasProcedureType);
|
||||
procedure WriteProcDecl(AProc: TPasProcedure);
|
||||
procedure WriteProcImpl(AProc: TPasProcedureImpl);
|
||||
procedure WriteProperty(AProp: TPasProperty);
|
||||
@ -159,6 +160,8 @@ begin
|
||||
WriteClass(TPasClassType(AType))
|
||||
else if AType.ClassType = TPasEnumType then
|
||||
wrtln(TPasEnumType(AType).GetDeclaration(true) + ';')
|
||||
else if AType is TPasProcedureType then
|
||||
WriteProcType(TPasProcedureType(AType))
|
||||
else
|
||||
raise Exception.Create('Writing not implemented for ' +
|
||||
AType.ElementTypeName + ' nodes');
|
||||
@ -333,6 +336,14 @@ begin
|
||||
wrtln(';');
|
||||
end;
|
||||
|
||||
procedure TPasWriter.WriteProcType(AProc: TPasProcedureType);
|
||||
begin
|
||||
wrt(TPasProcedureType(AProc).GetDeclaration(true));
|
||||
if TPasProcedureType(AProc).CallingConvention<>ccDefault then
|
||||
wrt('; '+cCallingConventions[TPasProcedureType(AProc).CallingConvention]);
|
||||
wrtln(';');
|
||||
end;
|
||||
|
||||
procedure TPasWriter.WriteProcDecl(AProc: TPasProcedure);
|
||||
var
|
||||
i: Integer;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user