Index: utils/peg/pegparser.dart |
diff --git a/utils/peg/pegparser.dart b/utils/peg/pegparser.dart |
index 13336825e4ae9471b3603830b2d49249ff32b997..36114537b9735da4faa826eec94b3d97c4c0da6a 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]; |