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