8000 `sepEndBy` behaves incorrectly (?) · Issue #113 · purescript-contrib/purescript-parsing · GitHub
[go: up one dir, main page]

Skip to content
sepEndBy behaves incorrectly (?) #113
Closed
@garyb

Description

@garyb
elemA = PS.string "A"
elemB = PS.string "B"
sep = PS.string ";"
parse = flip P.runParser do Tuple <$> PC.sepEndBy elemA sep <*> elemB

This now fails:

parse "A;B"

Prior to v6 it succeeded. Copying the old implementation of sepEndBy locally and implementing parse with that restores the original behaviour.

I'd say this behaviour is wrong too, it's not just that it's different now - as far as I can tell, if there's a trailing separator, and then any other input follows, the combinator fails now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething that should function correctly isn't.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0