I've been finding it difficult to figure out how to get proper error messages from a parser implemented with lezer. I noticed that you've included the standard JSON5 test suite, but it seems like this parser doesn't generate the same errors as the regular JSON5 parser.
For example, most of the time this parser throws errors like SyntaxError: No parse at 34 instead of:
SyntaxError: JSON5: invalid character '\"' at 1:35SyntaxError: Unexpected string in JSON at position 34
Also, because lezer is an error-tolerant parser it would be ideal if we could get human-readable messages without needing strict mode.
I'm not sure if these requests are possible, what do you think?
It definitely could be better. I don't have any time to look into it for now but if you come up with something I'd love to integrate some improvements.
I've been finding it difficult to figure out how to get proper error messages from a parser implemented with lezer. I noticed that you've included the standard JSON5 test suite, but it seems like this parser doesn't generate the same errors as the regular JSON5 parser.
For example, most of the time this parser throws errors like
SyntaxError: No parse at 34
instead of:SyntaxError: JSON5: invalid character '\"' at 1:35
SyntaxError: Unexpected string in JSON at position 34
Also, because lezer is an error-tolerant parser it would be ideal if we could get human-readable messages without needing strict mode.
I'm not sure if these requests are possible, what do you think?