Skip to content

Commit 7ca68cb

Browse files
author
Viktor Chernev
committed
fix bug Wrong possition in error message
1 parent 608429e commit 7ca68cb

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
BUG:Wrong possition im error message.
2+
The Gold parser engine gives wrong line number in error messages - most of the times wrong by 1
3+
I think that it is not a bug per se, but the position is 0 based, and tabs are counted as 1 symbol.
4+
5+
Exactly.
6+
First problem is that the GoldParser gives the _GoldParser.CurrentPosition as 0 based, and this is easily remedied.
7+
8+
The second problem is that a text editor as Notepad++ counts a tab for example as 4 symbols, but this can vary between editors and various settings. Thus, a strategy must be devised to deal with the issue in the future. For now, I have just fixed the 0 based part of the problem.

Documentation/v 9.1/bugWrongPositionInError.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FEATURE: Device a strategy to deal with error position offseting in different text editors
2+
A text editor as Notepad++ counts a tab for example as 4 symbols, but this can vary between editors and various settings. Thus, a strategy must be devised to deal with the issue

0 commit comments

Comments
 (0)