This more accurately explains what these cases mean. Either a parser has
committed to its parse, so if it fails it should not attempt other
parsers or it just peeked on its input and it is ok to attempt another
one.
Consumed and Empty were only accurate in what they did in simple
cases but as soon as attempt or a partial input failed they would not
be true any more. Also this is just a better explanation of how other
parsers should act when a parser returns one of these.
BREAKING CHANGE
Rename any use of Consumed to Commit and Empty to Peek
This more accurately explains what these cases mean. Either a parser has committed to its parse, so if it fails it should not attempt other parsers or it just
peek
ed on its input and it is ok to attempt another one.Consumed
andEmpty
were only accurate in what they did in simple cases but as soon asattempt
or a partial input failed they would not be true any more. Also this is just a better explanation of how other parsers should act when a parser returns one of these.BREAKING CHANGE
Rename any use of
Consumed
toCommit
andEmpty
toPeek