Bläddra i källkod

* fix deprecated etc for properties. Mantis 16672

git-svn-id: trunk@15728 -
marco 15 år sedan
förälder
incheckning
2e8b8fa54e
1 ändrade filer med 5 tillägg och 26 borttagningar
  1. 5 26
      packages/fcl-passrc/src/pparser.pp

+ 5 - 26
packages/fcl-passrc/src/pparser.pp

@@ -123,7 +123,7 @@ type
       AParent: TPasElement; AVisibility: TPasMemberVisibility): TPasElement;overload;
     Function IsCurTokenHint(out AHint : TPasMemberHint) : Boolean; overload;
     Function IsCurTokenHint: Boolean; overload;
-    Function CheckHint(Element : TPasElement; ExpectSemiColon : Boolean) : TPasMemberHints;
+    Function CheckHint(Element : TPasElement; ExpectSemiColon : Boolean;SkipSemi : Boolean=False) : TPasMemberHints;
 
     function ParseParams(paramskind: TPasExprKind): TParamsExpr;
     function ParseExpIdent: TPasExpr;
@@ -373,7 +373,7 @@ begin
 end;
 
 
-Function TPasParser.CheckHint(Element : TPasElement; ExpectSemiColon : Boolean) : TPasMemberHints;
+Function TPasParser.CheckHint(Element : TPasElement; ExpectSemiColon : Boolean;SkipSemi : Boolean=False) : TPasMemberHints;
 
 Var
   Found : Boolean;
@@ -383,6 +383,8 @@ begin
   Result:=[];
   Repeat
     NextToken;
+    if (curtoken=tksemicolon) and skipsemi  then
+      NextToken; 
     Found:=IsCurTokenHint(h);
     If Found then
       Include(Result,h)
@@ -2527,30 +2529,7 @@ begin
     NextToken;
   end;
 
-  if (CurToken = tkIdentifier) and (UpperCase(CurTokenText) = 'DEPRECATED') then begin
-//  nothing to do on DEPRECATED - just to accept
-//    NextToken;
-  end else
-    UngetToken;;
-
-//!!   else
-//  not DEFAULT prop accessor will be recheck for another token
-//!!    UngetToken;
-
-{
-  if CurToken = tkSemicolon then begin
-    // read semicolon
-    NextToken;
-  end;
-  if (CurToken = tkIdentifier) and (UpperCase(CurTokenText) = 'DEPRECATED') then begin
-//  nothing to do - just to process
-    NextToken;
-  end;
-  if CurToken = tkSemicolon then begin
-    // read semicolon
-    NextToken;
-  end;
-}
+  checkhint(Element,False,true);
 end;
 
 // Starts after the "begin" token