-
Notifications
You must be signed in to change notification settings - Fork 132
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
JavaTokenParsers stringLiteral Unicode literals not fully correct #324
Comments
Imported From: https://issues.scala-lang.org/browse/SI-1566?orig=1 |
@dcsobral said: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The stringLiteral function in scala.util.parsing.combinator.!JavaTokenParsers
tries to parse String literals with Unicode escape
sequence in them
However, such Unicode escapes can occur elsewhere,
including the first \ of an escape sequence,
or even instead of the " characters themselves (\u0022).
If you wish to support Unicode escapes, they should be
handled in a lower level stream Char => Char parser only,
where they would apply to string literals, numbers,
identifiers, etc.
Compile and run the following program
and pass it the strings:
and it parses the first correctly but fails on the second argument
(Be careful about quoting arguments to the shell.)
The text was updated successfully, but these errors were encountered: