Browse Source

* Fixed parsing of deprecated hint texts

git-svn-id: trunk@21849 -
michael 13 years ago
parent
commit
c04bfe02e3
2 changed files with 14 additions and 1 deletions
  1. 2 0
      packages/fcl-passrc/src/pastree.pp
  2. 12 1
      packages/fcl-passrc/src/pparser.pp

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

@@ -103,6 +103,7 @@ type
     FName: string;
     FParent: TPasElement;
     FHints : TPasMemberHints;
+    FHintMessage : String;
   protected
     procedure ProcessHints(const ASemiColonPrefix: boolean; var AResult: string); virtual;
   public
@@ -125,6 +126,7 @@ type
     property Parent: TPasElement read FParent;
     Property Hints : TPasMemberHints Read FHints Write FHints;
     Property CustomData : TObject Read FData Write FData;
+    Property HintMessage : String Read FHintMessage Write FHintMessage;
   end;
 
   TPasExprKind = (pekIdent, pekNumber, pekString, pekSet, pekNil, pekBoolConst, pekRange,

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

@@ -55,6 +55,7 @@ resourcestring
 
   SLogStartImplementation = 'Start parsing implementation section.';
   SLogStartInterface = 'Start parsing interface section';
+  SParsingUsedUnit = 'Parsing used unit "%s" with commandLine "%s"';
 
 type
   TPasParserLogHandler = Procedure (Sender : TObject; Const Msg : String) of object;
@@ -657,7 +658,17 @@ begin
     NextToken;
     Found:=IsCurTokenHint(h);
     If Found then
-      Include(Result,h)
+      begin
+      Include(Result,h);
+      if (h=hDeprecated) then
+        begin
+        NextToken;
+        if (Curtoken<>tkString) then
+          UnGetToken
+        else
+          Element.HintMessage:=CurTokenString;
+        end;
+      end;
   Until Not Found;
   UnGetToken;
   If Assigned(Element) then