Skip to content

Refine the error type in parser.ts #178

@baetheus

Description

@baetheus

The initial Parser type in parser.ts reuses the DecodeError type from decoder.ts. It does this because there was already a bevy of combinators for creating and merging various DecodeError structures (intersection, union, leaf, etc) and I was unclear on the structure of errors I might encounter in designing parser.ts.

It has become clear that this implementation of parser really only has a one or more errors and that the errors should include cursor and length information to create better error messages.

Additionally, I want to look into partial parse results so recovery is an option.

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