mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 08:09:28 +02:00
* PAckage name can contain package keyword
This commit is contained in:
parent
b245f2deb1
commit
40c386d6bc
@ -3612,7 +3612,7 @@ begin
|
|||||||
NextToken;
|
NextToken;
|
||||||
while CurToken = tkDot do
|
while CurToken = tkDot do
|
||||||
begin
|
begin
|
||||||
ExpectIdentifier;
|
ExpectIdentifier([tkPackage]);
|
||||||
N := N + '.' + CurTokenString;
|
N := N + '.' + CurTokenString;
|
||||||
NextToken;
|
NextToken;
|
||||||
end;
|
end;
|
||||||
@ -4158,7 +4158,7 @@ begin
|
|||||||
{$IFDEF VerbosePasParserWriteln}
|
{$IFDEF VerbosePasParserWriteln}
|
||||||
writeln('TPasParser.AddUseUnit AUnitName=',AUnitName,' CurModule.Name=',CurModule.Name);
|
writeln('TPasParser.AddUseUnit AUnitName=',AUnitName,' CurModule.Name=',CurModule.Name);
|
||||||
{$ENDIF VerbosePasParserWriteln}
|
{$ENDIF VerbosePasParserWriteln}
|
||||||
if CompareText(AUnitName,CurModule.Name)=0 then
|
if (CompareText(AUnitName,CurModule.Name)=0) and not CurModule.InheritsFrom(TPasDynamicPackage) then
|
||||||
begin
|
begin
|
||||||
if CompareText(AUnitName,'System')=0 then
|
if CompareText(AUnitName,'System')=0 then
|
||||||
exit; // for compatibility ignore implicit use of system in system
|
exit; // for compatibility ignore implicit use of system in system
|
||||||
@ -4221,7 +4221,7 @@ var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
repeat
|
repeat
|
||||||
ExpectIdentifier();
|
ExpectIdentifier([tkPackage]);
|
||||||
PckPos:=CurSourcePos;
|
PckPos:=CurSourcePos;
|
||||||
Pck:=TPasRequiredPackage(Engine.CreateElement(TPasRequiredPackage,CurtokenString,aSection,visPublic,PckPos));
|
Pck:=TPasRequiredPackage(Engine.CreateElement(TPasRequiredPackage,CurtokenString,aSection,visPublic,PckPos));
|
||||||
aSection.Requires.Add(Pck);
|
aSection.Requires.Add(Pck);
|
||||||
|
Loading…
Reference in New Issue
Block a user