-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
go/parser: eats \r in comments #11151
Comments
This is non-urgent and extremely unlikely to be a problem in real-world programs. Background: This is done deliberately, the go/scanner strips \r from comments explicitly ( http://golang.org/cl/6225047 ) - this was done in response to issue #3647 . That said, perhaps the original change was not ideal or too aggressive, and/or the spec should be clarified (as in \r are stripped from comments). |
|
Alternatively, the scanner may not change comment contents at all, but the printer could apply the fix where needed. |
Change https://golang.org/cl/87498 mentions this issue: |
In the following program go/parser/printer turn a correct program into incorrect one, and so the second parsing fails:
go version devel +b0532a9 Mon Jun 8 05:13:15 2015 +0000 linux/amd64
The text was updated successfully, but these errors were encountered: