instaparse icon indicating copy to clipboard operation
instaparse copied to clipboard

Parse Error Feedback: '^' character misaligned with actual parse error location

Open seltzer1717 opened this issue 6 years ago • 1 comments

'^' is often not aligned with the actual location. This is most often due to tabs. The '^' character is being placed with spaces, but the error line can have tabs.

The solution should be simple, just use the white space characters from the failing line rather than spaces and substitute spaces for regular characters as the code does now.

I will try a pull request to correct this and take it if you like.

seltzer1717 avatar Dec 22 '19 17:12 seltzer1717

That sounds like a good idea. Thanks.

On Sun, Dec 22, 2019 at 9:27 AM seltzer1717 [email protected] wrote:

'^' is often not aligned with the actual location. This is most often due to tabs. The '^' character is being placed with spaces, but the error line can have tabs.

The solution should be simple, just use the white space characters from the failing line rather than spaces and substitute spaces for regular characters as the code does now.

I will try a pull request to correct this and take it if you like.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Engelberg/instaparse/issues/200?email_source=notifications&email_token=AABB2S7D6AIBN36XRT4QRKLQZ6PRPA5CNFSM4J6MXOAKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ICGKOOA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABB2S4JTHJP6VXULITIPF3QZ6PRPANCNFSM4J6MXOAA .

Engelberg avatar Dec 22 '19 23:12 Engelberg