Browse Source

--- Merging r15399 into '.':
U packages/fcl-passrc/src/pparser.pp

# revisions: 15399
------------------------------------------------------------------------
r15399 | michael | 2010-06-10 08:48:20 +0200 (Thu, 10 Jun 2010) | 1 line
Changed paths:
M /trunk/packages/fcl-passrc/src/pparser.pp

* option to parse only interface
------------------------------------------------------------------------

git-svn-id: branches/fixes_2_4@15487 -

marco 15 years ago
parent
commit
6c8d9d46db
1 changed files with 4 additions and 1 deletions
  1. 4 1
      packages/fcl-passrc/src/pparser.pp

+ 4 - 1
packages/fcl-passrc/src/pparser.pp

@@ -50,6 +50,7 @@ type
   TPasTreeContainer = class
   protected
     FPackage: TPasPackage;
+    FInterfaceOnly : Boolean;
   public
     function CreateElement(AClass: TPTreeElement; const AName: String;
       AParent: TPasElement; const ASourceFilename: String;
@@ -64,6 +65,7 @@ type
     function FindElement(const AName: String): TPasElement; virtual; abstract;
     function FindModule(const AName: String): TPasModule; virtual;
     property Package: TPasPackage read FPackage;
+    property InterfaceOnly : Boolean Read FInterfaceOnly Write FInterFaceOnly;
   end;
 
   EParserError = class(Exception)
@@ -919,7 +921,8 @@ begin
       tkimplementation:
         if (CurToken = tkImplementation) and (Declarations is TInterfaceSection) then
           begin
-          ParseImplementation;
+          If Not Engine.InterfaceOnly then
+            ParseImplementation;
           break;
           end;
       tkinitialization: