Skip to content

Recompute line number for ParseError passed up from .bind #47

@deliciouslytyped

Description

@deliciouslytyped

ParseErrors in a ".bind" contain stream and index information relative to their own context.
If this isn't handled in the bind, but rather passed up through the bind to the parser with the larger context, a new ParseError should be created containing information from the nested parse context and the current parse context (perhaps with an attribute containing a nested structure similar to the error graph - or maybe it's just linear?).

My naive messy implementation just adds arguments to the .bind function and has a user supplied function recompute the index information by adding the index of the subparser to the index from the outer context, which iI'm not sure is 100% correct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions