* store the filename of uses yy in xxx syntax.

git-svn-id: trunk@15745 -
This commit is contained in:
marco 2010-08-08 13:32:07 +00:00
parent 181804e4b9
commit 198fea10a8
2 changed files with 4 additions and 1 deletions

View File

@ -255,6 +255,7 @@ type
InitializationSection: TInitializationSection;
FinalizationSection: TFinalizationSection;
PackageName: string;
Filename : String; // the IN filename, only written when not empty.
end;
{ TPasPackage }

View File

@ -1552,7 +1552,7 @@ begin
begin
AUnitName := ExpectIdentifier;
Element := Engine.FindModule(AUnitName);
Element := Engine.FindModule(AUnitName); // should we resolve module here when "IN" filename is not known yet?
if Assigned(Element) then
Element.AddRef
else
@ -1566,6 +1566,8 @@ begin
// todo: store unit's file name somewhere
NextToken; // skip in
ExpectToken(tkString); // skip unit's real file name
if (Element is TPasModule) and (TPasmodule(Element).filename<>'') then
TPasModule(Element).FileName:=curtokenstring;
end;
if CurToken = tkSemicolon then