J-F-Liu / pom

PEG parser combinators using operator overloading without macros.
MIT License
496 stars 30 forks source link

panic on end of input if take() without end() #28

Closed Cokemonkey11 closed 5 years ago

Cokemonkey11 commented 5 years ago

I don't think it should panic.

I get around the problem by consuming end(), but this could probably still be improved.

    (
        wurstdok() |
        !end() *
        take(1).map(|_| WurstDok::Nothing)
    ).repeat(0..)
J-F-Liu commented 5 years ago

Fixed.