Error point accuracy

This commit is contained in:
mysticbbs 2012-08-24 14:38:49 -04:00
parent fdf18fe49f
commit 6410bb30d4
1 changed files with 10 additions and 0 deletions

View File

@ -260,6 +260,8 @@ Begin
End; End;
Procedure TParserEngine.Error (ErrNum: Byte; Str: String); Procedure TParserEngine.Error (ErrNum: Byte; Str: String);
Var
LastLineCol : SmallInt;
Begin Begin
If UpdateInfo.ErrorType > 0 Then Exit; If UpdateInfo.ErrorType > 0 Then Exit;
@ -275,6 +277,8 @@ Begin
Case InFile[CurFile].DataFile.Read of Case InFile[CurFile].DataFile.Read of
#10 : Begin #10 : Begin
Inc (UpdateInfo.ErrorLine); Inc (UpdateInfo.ErrorLine);
LastLineCol := UpdateInfo.ErrorCol;
UpdateInfo.ErrorCol := 0; UpdateInfo.ErrorCol := 0;
End; End;
#09, #09,
@ -284,6 +288,12 @@ Begin
End; End;
End; End;
End; End;
If (UpdateInfo.ErrorCol = 0) and (UpdateInfo.ErrorLine > 1) Then Begin
Dec (UpdateInfo.ErrorLine);
UpdateInfo.ErrorCol := LastLineCol + 1;
End;
End; End;
Function TParserEngine.CurFilePos : LongInt; Function TParserEngine.CurFilePos : LongInt;