Index: lib/compiler/implementation/string_validator.dart |
=================================================================== |
--- lib/compiler/implementation/string_validator.dart (revision 14156) |
+++ lib/compiler/implementation/string_validator.dart (working copy) |
@@ -99,7 +99,9 @@ |
for(Iterator<int> iter = string.iterator(); iter.hasNext; length++) { |
index++; |
int code = iter.next(); |
+ bool verify_code = false; |
ngeoffray
2012/10/27 09:02:00
verify_code -> verifyCode
|
if (code == $BACKSLASH) { |
+ verify_code = true; |
if (quoting.raw) continue; |
containsEscape = true; |
if (!iter.hasNext) { |
@@ -170,7 +172,7 @@ |
} |
// This handles both unescaped characters and the value of unicode |
ahe
2012/10/28 12:07:02
I don't think this comment is correct any more.
|
// escapes. |
- if (!isUnicodeScalarValue(code)) { |
+ if (verify_code && !isUnicodeScalarValue(code)) { |
ahe
2012/10/28 12:07:02
This doesn't look right to me. If we are switching
cshapiro
2012/10/29 06:37:17
The specification for string literals was delibera
ahe
2012/10/29 08:11:07
If the underlying string representation is UTF-16,
siva
2012/10/31 01:21:26
I have decided to drop these changes made to dart2
|
stringParseError( |
"Invalid Unicode scalar value U+${code.toRadixString(16)}", |
token, index); |