Closed sogaiu closed 5 months ago
I consider it a feature, even if it is not documented. If I understand correctly, it checks if anything is at the offset. The code suggests this usage, too.
Yeah, I think it's safer (and possibly more convenient) to adjust the documentation.
The functionality with optional rules makes sense to me.
I'll close this for now and see if a pr to the docs will be accepted.
I noticed today that it's possible to use the peg special
look
with only one argument:The website currently says something like:
If the current behavior is intentional, perhaps the docs could state the "optionalness" of
patt
. But then may be there is more to explain for the case where there is nopatt
specified as well.I suppose changing the current behavior has a chance of breaking existing pegs.
Any thoughts?
For reference, source code currently has: