瀏覽代碼

* Fixed Support for absolute. Stored absolute location

git-svn-id: trunk@6030 -
michael 18 年之前
父節點
當前提交
3ee2cef1b9
共有 2 個文件被更改,包括 12 次插入1 次删除
  1. 1 0
      fcl/passrc/pastree.pp
  2. 11 1
      fcl/passrc/pparser.pp

+ 1 - 0
fcl/passrc/pastree.pp

@@ -313,6 +313,7 @@ type
     VarType: TPasType;
     Value: string;
     Modifiers : string;
+    AbsoluteLocation : String;
   end;
 
   TPasConst = class(TPasVariable)

+ 11 - 1
fcl/passrc/pparser.pp

@@ -1200,8 +1200,18 @@ begin
   NextToken;
   if CurToken = tkAbsolute then
   begin
-    // !!!: Store this information
     ExpectIdentifier;
+    S:=CurTokenText;
+    NextToken;
+    if CurToken=tkDot then
+      begin
+      ExpectIdentifier;
+      S:=S+'.'+CurTokenText;
+      end
+    else
+      UnGetToken;
+    For I:=0 to List.Count-1 do
+      TPasVariable(List[i]).AbsoluteLocation:=S;
   end else
     UngetToken;