fcl-passrc: fixed error position on include file not found

git-svn-id: trunk@40171 -
This commit is contained in:
Mattias Gaertner 2018-11-01 23:23:34 +00:00
parent 2a9ce2ed6c
commit 571094912b

View File

@ -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