Skip to content

Better error reporting #9

@qpanda

Description

@qpanda

Errors are difficult to read and interpret by users, especially when parsing the expression grammar fails. There are several crates to format diagnostic messages on source code snippets in the terminal, including chic, annotate-snippets, codespan-reporting, and codemap-diagnostic, which could be used to format expression parsing errors in a more user friendly way.

It would also be useful to return more detailed error messages from rules in the grammar, especially when parsing dates/times that don't conform to the specified format fails. It is, however, not clear whether this is possible with rust-peg because conditional actions return Result<T, &str>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions