mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 20:20:47 +02:00
fcl-passrc: fixed error position on include file not found
git-svn-id: trunk@40171 -
This commit is contained in:
parent
2a9ce2ed6c
commit
571094912b
@ -3079,7 +3079,6 @@ end;
|
||||
procedure TPascalScanner.HandleIncludeFile(Param: String);
|
||||
|
||||
begin
|
||||
PushStackItem;
|
||||
if Length(Param)>1 then
|
||||
begin
|
||||
if (Param[1]='''') then
|
||||
@ -3092,6 +3091,7 @@ begin
|
||||
FCurSourceFile := FileResolver.FindIncludeFile(Param);
|
||||
if not Assigned(FCurSourceFile) then
|
||||
Error(nErrIncludeFileNotFound, SErrIncludeFileNotFound, [Param]);
|
||||
PushStackItem;
|
||||
FCurFilename := Param;
|
||||
if FCurSourceFile is TFileLineReader then
|
||||
FCurFilename := TFileLineReader(FCurSourceFile).Filename; // nicer error messages
|
||||
|
Loading…
Reference in New Issue
Block a user