Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(589)

Unified Diff: lib/json/json.dart

Issue 10801002: Add multibyte string support to debugger (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/bin/dbg_connection.cc » ('j') | runtime/bin/dbg_connection.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/json/json.dart
===================================================================
--- lib/json/json.dart (revision 9716)
+++ lib/json/json.dart (working copy)
@@ -80,6 +80,7 @@
static final int CHAR_9 = 57;
static final int COLON = 58;
static final int CHAR_CAPITAL_E = 69;
+ static final int CHAR_CAPITAL_U = 85;
static final int LBRACKET = 91;
static final int BACKSLASH = 92;
static final int RBRACKET = 93;
@@ -295,6 +296,19 @@
}
position += 4;
break;
+ case CHAR_CAPITAL_U:
+ // Non-standard 32 bit characters of format \UHHHHHHHH.
siva 2012/07/18 17:11:31 What do you mean by non-standard here? not part of
hausner 2012/07/18 22:20:36 I reverted the changes in this file, they are no l
+ if (position + 9 > length) {
+ _error('Invalid unicode esacape sequence');
+ }
+ final codeString = json.substring(position + 1, position + 9);
+ try {
+ c = Math.parseInt('0x${codeString}');
+ } catch (var e) {
+ _error('Invalid unicode esacape sequence');
+ }
+ position += 8;
+ break;
default:
_error('Invalid esacape sequence in string literal');
}
« no previous file with comments | « no previous file | runtime/bin/dbg_connection.cc » ('j') | runtime/bin/dbg_connection.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698