mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 11:09:19 +02:00
* Merging revisions r46280 from trunk:
------------------------------------------------------------------------ r46280 | michael | 2020-08-06 08:50:29 +0200 (Thu, 06 Aug 2020) | 1 line * Support writing resource strings ------------------------------------------------------------------------ git-svn-id: branches/fixes_3_2@46606 -
This commit is contained in:
parent
896cbd84e1
commit
d791d13e4d
@ -83,6 +83,7 @@ type
|
||||
constructor Create(AStream: TStream); virtual;
|
||||
destructor Destroy; override;
|
||||
procedure AddForwardClasses(aSection: TPasSection); virtual;
|
||||
procedure WriteResourceString(aStr: TPasResString); virtual;
|
||||
procedure WriteEnumType(AType: TPasEnumType); virtual;
|
||||
procedure WriteElement(AElement: TPasElement);virtual;
|
||||
procedure WriteType(AType: TPasType; Full : Boolean = True);virtual;
|
||||
@ -247,10 +248,19 @@ begin
|
||||
WriteProcImpl(TProcedureBody(AElement))
|
||||
else if AElement.InheritsFrom(TPasImplCommand) or AElement.InheritsFrom(TPasImplCommands) then
|
||||
WriteImplElement(TPasImplElement(AElement),false)
|
||||
else
|
||||
else if AElement.InheritsFrom(TPasResString) then
|
||||
WriteResourceString(TPasResString(AElement))
|
||||
else
|
||||
raise EPasWriter.CreateFmt('Writing not implemented for %s nodes',[AElement.ElementTypeName]);
|
||||
end;
|
||||
|
||||
procedure TPasWriter.WriteResourceString(aStr : TPasResString);
|
||||
|
||||
begin
|
||||
PrepareDeclSection('resourcestring');
|
||||
AddLn(Astr.GetDeclaration(True)+';');
|
||||
end;
|
||||
|
||||
procedure TPasWriter.WriteEnumType(AType: TPasEnumType);
|
||||
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user