2
0
Эх сурвалжийг харах

fcl-passrc: paswrite: allow write TPasImplCommand and TPasImplCommands directly in TPasWriter.WriteElement. Useful way to build pascal code by using predfined code blocks.

git-svn-id: trunk@36616 -
maciej-izak 8 жил өмнө
parent
commit
6006c6a8bd

+ 2 - 0
packages/fcl-passrc/src/paswrite.pp

@@ -141,6 +141,8 @@ begin
     WriteProcDecl(TPasProcedure(AElement))
   else if AElement.InheritsFrom(TPasProcedureImpl) then
     WriteProcImpl(TPasProcedureImpl(AElement))
+  else if AElement.InheritsFrom(TPasImplCommand) or AElement.InheritsFrom(TPasImplCommands) then
+    WriteImplElement(TPasImplElement(AElement),false)
   else
     raise Exception.Create('Writing not implemented for ' +
       AElement.ElementTypeName + ' nodes');