-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong input lines on error #634
Comments
I'm seeing something similar using nearley and moo. In my case, the line number and offset in the error are correct, but the displayed source context in the error is from a completely different part of the input. In the example below, the error really is a line 66 col 18, but the displayed text of "}" is from the end of the input which is actually line 151.
In my case, I'm feeding the parser like this:
|
I am experiencing this as well |
Hi, Yeh, it's the same for me as well. Line numbers are spot on, but as said elsewhere: the displayed source context in the error is from a completely different part of the input. |
Also seeing this with our omgidl parsing library that uses nearley and moo here: https://github.com/foxglove/omgidl/tree/main/packages/omgidl-parser |
long-text.txt
Error message:
Note the error message mentions token value "1", but points line with
3
. Line numbers are also off.How to reproduce:
long-text.ne
long-text.ts
Command:
Version:
The text was updated successfully, but these errors were encountered: