ast
ast copied to clipboard
Improvement: Tell me where I am in the tree when a parse failure happens
The error message currently includes which AST (struct|enum) is currently being parsed, but does not say which Pest token we are currently at.
- "Extraneous tokens" should tell me which tokens are bonus
- "No Match" should tell me what token is present.
This would be extremely helpful.
As I've seen, pest prints helpful errors, and hopefully pest-ast can also print similarly helpful errors.