-
-
Notifications
You must be signed in to change notification settings - Fork 647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
read-cdot consumes whitespace after everything even when there is no dot #1454
Comments
This is the documented behavior.
|
The "seek through whitespace" bit doesn't imply to me that the input is consumed even if no dots are found. I would expect it to do what Alex is suggesting: peek ahead and only consume if it actually finds dots. |
Peeking through the history @AlexKnauth is the one who wrote the doc (17db8e5) so they have a better grasp on this than me :) |
I'm going to improve the documentation to replace "seek through" with "consume". Peeking arbitrarily far in a stream is not a great property for a parser, and I don't think we should introduce that behavior. |
I would expect this program to return
#\newline
just as it does withoutread-cdot
turned on.But instead it returns
#\b
. Should theread-cdot
-true reader be changed to peek through whitespace instead of consuming it?The text was updated successfully, but these errors were encountered: