ソースを参照

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 年 前
コミット
6006c6a8bd
1 ファイル変更2 行追加0 行削除
  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))
   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');