forked from jasder/antlr
I altered Target.getTargetStringLiteralFromANTLRStringLiteral() so that it converts \uXXXX in an ANTLR string to \uXXXX, thus, avoiding Java's conversion to a single character before compilation. Fixes antlr/antlr#111
This commit is contained in:
parent
5d390b4a90
commit
bd46ac1c3f
|
@ -1,5 +1,11 @@
|
|||
ANTLR v4 Honey Badger
|
||||
|
||||
December 31, 2012
|
||||
|
||||
* I altered Target.getTargetStringLiteralFromANTLRStringLiteral() so that
|
||||
it converts \uXXXX in an ANTLR string to \\uXXXX, thus, avoiding Java's
|
||||
conversion to a single character before compilation.
|
||||
|
||||
December 16, 2012
|
||||
|
||||
* Encapsulate some fields in ANTLRMessage
|
||||
|
|
|
@ -284,7 +284,8 @@ public class Target {
|
|||
case 'f':
|
||||
case '\\':
|
||||
case 'u': // Assume unnnn
|
||||
sb.append('\\'); // Pass the escape through
|
||||
sb.append('\\'); // Pass the escape through as double \\
|
||||
sb.append('\\'); // so that Java leaves as \u0000 string not char
|
||||
break;
|
||||
default:
|
||||
// Remove the escape by virtue of not adding it here
|
||||
|
|
Loading…
Reference in New Issue