Skip to content
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

Parse errors with zero length give badly-formatted errors #212

Closed
hildjj opened this issue Nov 18, 2021 · 0 comments
Closed

Parse errors with zero length give badly-formatted errors #212

hildjj opened this issue Nov 18, 2021 · 0 comments
Assignees
Labels
blocks-release Blocks an imminent release. High Priorty.

Comments

@hildjj
Copy link
Contributor

hildjj commented Nov 18, 2021

echo "foo='1' '2'" | peggy -t 1

produces:

Error: Expected "2" but end of input found.
 --> command line:1:2
  |
1 | 1
  |

with no "^" in the third line. When the error is "end of input", the error column will be the same as the length of the line. Add a check for this condition.

I believe GrammarError has the same issue.

@hildjj hildjj self-assigned this Nov 18, 2021
@hildjj hildjj added the blocks-release Blocks an imminent release. High Priorty. label Nov 18, 2021
@hildjj hildjj mentioned this issue Nov 22, 2021
@hildjj hildjj closed this as completed in dc5af36 May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocks-release Blocks an imminent release. High Priorty.
Projects
None yet
Development

No branches or pull requests

1 participant