m4rw3r / chomp

A fast monadic-style parser combinator designed to work on stable Rust.
Apache License 2.0
243 stars 19 forks source link

combinators::option: If parser reports incomplete on finite input, return default #36

Closed vincent23 closed 8 years ago

vincent23 commented 8 years ago

Fixes an issue similar to #35 with option

m4rw3r commented 8 years ago

option in attoparsec is defined as p <|> ret default, and the behavior of option and or when encountering Incomplete should be the same. Thanks for spotting this!