Skip to content

lastNoSuccessVar is a source of mystery #107

Closed
@svalaskevicius

Description

@svalaskevicius

what is the purpose of lastNoSuccessVar?

I've just had an intensive debugging session trying to figure out why is the parser reviving a harmless parse failure that should have been resolved by the | operator (and indeed it has been). In addition, by showing an irrelevant failure, this variable has hidden the real error just before the end of parser's input.

For now, I've cloned the phrase function to my parser, doing the same just w/o the mutable state to hold false errors, however, should the variable usage be removed from the library or are there any use cases where it is helpful? (and can they be solved in a referentially transparent way?)

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