Skip to content

make sure parser always returns something useful #4

@3b

Description

@3b

The grammar should match all input, but in case of bugs it would be nice to (optionally?) catch parse errors and return something useful anyway.

  • first step would probably be to add a catch-all (* character) to the end of the doc rule, and add it to the blocks (maybe as an extra plain block?)
  • "incomplete parse" errors should probably be handled the same way (maybe not even bother with trying to catch extra in the doc grammar if this needs to be here anyway?)
  • "parse failed" should just return the original input?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions