We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
For non-terminated strings (and characters), the scanner returns a literal that is longer (by one character) than is necessary. Example: $ cat x.go package p import ( "foo ) $ gotype -trace x.go 1: 1: File ( 1: 1: . "package" 1: 9: . IDENT p 1: 10: . ";" 3: 1: . GenDecl(import) ( 3: 1: . . "import" 3: 8: . . "(" 4: 2: . . ImportSpec ( 4: 2: . . . STRING "foo ) 5: 2: . . . ";" 5: 3: . . ) 5: 3: . . EOF 5: 3: . ) 5: 3: ) x.go:4:2: string not terminated x.go:5:3: expected ')', found 'EOF' The reported literal value for the non-terminated string "foo is "\"foo\n)" rather than just "\"foo\n" (extra ) at end). This can lead to worse parser token synchronization in error situations than necessary.
The text was updated successfully, but these errors were encountered:
Comment 1:
This issue was closed by revision 11740e1.
Status changed to Fixed.
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: