Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before I can start recognizing shorthands (which might have parseable HTML inside of them) in the parser, I need the ability to return multiple nodes from a single
parseNode
call.While I was here, I did a little more cleanup:
Stream
now caches its length, to speed up.eof()
calls. (I presume the chars are immutable anyway.)Any
all over. I went ahead and moved away from the slightly silly "return the Failure class itself" design, instead using None as the marker; if None is a valid value you can just get the full val/i/error triple to check for success.__iter__
to return the(value, i)
tuple, instead just requiring you to specifically request the.t2
tuple from each result. (or.t3
to get the error, or just the.value
or.i
if that's all you need).