Skip to content

skipSpaces always commits to branch even if no spaces are consumed #200

Closed
@JordanMartinez

Description

@JordanMartinez

Describe the bug

skipSpaces always commits to its path, even if it doesn't consume any spaces. This occurs because it uses the consumeWith function.

To Reproduce

See https://try.purescript.org/?gist=a37247868f0f7aaf3244f8c07fc304f6

In the line 4, no spaces are consumed. So, the (singleLineComment <|> newline) parse shouldn't occur and we should instead move to the next part of the parser string "@" *> string "value".

Expected behavior

skipSpaces should only commit to its path if it actually consumes content.

Additional context
Add any other context about the problem here.

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