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

Unified Diff: utils/peg/pegparser.dart

Issue 12282038: Remove deprecated string features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head Created 7 years, 10 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 | « utils/css/tokenkind.dart ('k') | utils/pub/hosted_source.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/peg/pegparser.dart
diff --git a/utils/peg/pegparser.dart b/utils/peg/pegparser.dart
index 9072e2d315f92396fad80b55320f05077c83ff30..e389e8d1e5b82eab7e56b0828c44603578f7c244 100644
--- a/utils/peg/pegparser.dart
+++ b/utils/peg/pegparser.dart
@@ -62,7 +62,7 @@ _Rule CHAR([characters]) {
// Find the range of character codes and construct an array of flags for codes
// within the range.
- List<int> codes = characters.charCodes;
+ List<int> codes = characters.codeUnits;
codes.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
int lo = codes[0];
int hi = codes[codes.length - 1];
@@ -452,7 +452,7 @@ class _CharCodeRule extends _Rule {
_match(_ParserState state, int pos) {
if (pos == state._end)
return null;
- int code = state._text.charCodeAt(pos);
+ int code = state._text.codeUnitAt(pos);
if (_predicate(code))
return [pos + 1, null];
return null;
@@ -511,7 +511,7 @@ class _StringRule extends _Rule implements _Expectable {
if (pos + _len > state._end)
return null;
for (int i = 0; i < _len; i++) {
- if (state._text.charCodeAt(pos + i) != _string.charCodeAt(i))
+ if (state._text.codeUnitAt(pos + i) != _string.codeUnitAt(i))
return null;
}
return [pos + _len, null];
« no previous file with comments | « utils/css/tokenkind.dart ('k') | utils/pub/hosted_source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698