Browse Source

* Added support for interface delegation (Implements)

git-svn-id: trunk@11677 -
michael 17 years ago
parent
commit
53deaee379
2 changed files with 8 additions and 1 deletions
  1. 5 1
      packages/fcl-passrc/src/pastree.pp
  2. 3 0
      packages/fcl-passrc/src/pparser.pp

+ 5 - 1
packages/fcl-passrc/src/pastree.pp

@@ -357,7 +357,7 @@ type
     function GetDeclaration(full : boolean) : string; override;
   public
     Args: TList;        // List of TPasArgument objects
-    IndexValue, ReadAccessorName, WriteAccessorName,
+    IndexValue, ReadAccessorName, WriteAccessorName,ImplementsName,
       StoredAccessorName, DefaultValue: string;
     IsDefault, IsNodefault: Boolean;
   end;
@@ -1428,7 +1428,11 @@ begin
   else
     S:=' ';
   If Full then
+    begin
     Result:=Name+S+': '+Result;
+    If (ImplementsName<>'') then
+       Result:=Result+' implements '+ImplementsName;
+    end;   
   If IsDefault then
     Result:=Result+'; default'
 end;

+ 3 - 0
packages/fcl-passrc/src/pparser.pp

@@ -1725,6 +1725,9 @@ begin
     if (CurToken = tkIdentifier) and (UpperCase(CurTokenText) = 'WRITE') then
       TPasProperty(Element).WriteAccessorName := GetAccessorName
     else
+    if (CurToken = tkIdentifier) and (UpperCase(CurTokenText) = 'IMPLEMENTS') then
+      TPasProperty(Element).ImplementsName := GetAccessorName
+    else
 //    not write accessor will be recheck for another token
       UngetToken;