Browse Source

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 years ago
parent
commit
6006c6a8bd
1 changed files with 2 additions and 0 deletions
  1. 2 0
      packages/fcl-passrc/src/paswrite.pp

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

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