Parsita 2.1.0
This is a quick follow-on to the 2.0.0 release. I neglected to make some methods private that were supposed to be private. Because the 2.0.0 release was only three days ago, I hope this will be fine. This is just a bugfix release for anyone who combines the built-in parsers to make their parsers (most users). But this is a severely breaking change for any custom parsers (inherit from Parser
rather than use them).
- Made
Parser.consume
private- Renamed
consume
to_consume
- Renamed
cached_consume
toconsume
- This is the breaking change for custom parsers. Custom parsers now need to override
_consume
instead ofconsume
and need to callconsume
instead ofcached_consume
. This actually brings the 2.x branch a little bit closer to the 1.x branch.
- Renamed
- Renamed
StringReader.current_line
to_current_line
- Moved
Parser.handle_other
to a global function- Export this function as
parsita.parsers.wrap_literal
- Use
wrap_literal
for all the parsers, not just the operators- Literal wrapping now applies to all non-
Parser
objects, not juststr
pred
now wraps literals like the other parsers, rather than requiring a properParser
object
- Literal wrapping now applies to all non-
- Export this function as