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

Unified Diff: utils/template/tokenizer_base.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/template/tokenizer.dart ('k') | utils/template/tokenkind.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/template/tokenizer_base.dart
diff --git a/utils/template/tokenizer_base.dart b/utils/template/tokenizer_base.dart
index 65b96cdab2f370a7dec1dca994a8641425a458fc..eb1bcdfb821ae08d1d601e03278d13f054996fe4 100644
--- a/utils/template/tokenizer_base.dart
+++ b/utils/template/tokenizer_base.dart
@@ -52,7 +52,7 @@ class TokenizerBase extends TokenizerHelpers implements TokenSource {
int _nextChar() {
if (_index < _text.length) {
- return _text.charCodeAt(_index++);
+ return _text.codeUnitAt(_index++);
} else {
return 0;
}
@@ -60,7 +60,7 @@ class TokenizerBase extends TokenizerHelpers implements TokenSource {
int _peekChar() {
if (_index < _text.length) {
- return _text.charCodeAt(_index);
+ return _text.codeUnitAt(_index);
} else {
return 0;
}
@@ -68,7 +68,7 @@ class TokenizerBase extends TokenizerHelpers implements TokenSource {
bool _maybeEatChar(int ch) {
if (_index < _text.length) {
- if (_text.charCodeAt(_index) == ch) {
+ if (_text.codeUnitAt(_index) == ch) {
_index++;
return true;
} else {
@@ -99,7 +99,7 @@ class TokenizerBase extends TokenizerHelpers implements TokenSource {
Token finishWhitespace() {
_index--;
while (_index < _text.length) {
- final ch = _text.charCodeAt(_index++);
+ final ch = _text.codeUnitAt(_index++);
if (ch == 32/*' '*/ || ch == 9/*'\t'*/ || ch == 13/*'\r'*/) {
// do nothing
} else if (ch == 10/*'\n'*/) {
@@ -158,7 +158,7 @@ class TokenizerBase extends TokenizerHelpers implements TokenSource {
void eatDigits() {
while (_index < _text.length) {
- if (TokenizerHelpers.isDigit(_text.charCodeAt(_index))) {
+ if (TokenizerHelpers.isDigit(_text.codeUnitAt(_index))) {
_index++;
} else {
return;
@@ -189,7 +189,7 @@ class TokenizerBase extends TokenizerHelpers implements TokenSource {
}
var result = 0;
while (_index < maxIndex) {
- final digit = _hexDigit(_text.charCodeAt(_index));
+ final digit = _hexDigit(_text.codeUnitAt(_index));
if (digit == -1) {
if (hexLength == null) {
return result;
@@ -197,7 +197,7 @@ class TokenizerBase extends TokenizerHelpers implements TokenSource {
return -1;
}
}
- _hexDigit(_text.charCodeAt(_index));
+ _hexDigit(_text.codeUnitAt(_index));
// Multiply by 16 rather than shift by 4 since that will result in a
// correct value for numbers that exceed the 32 bit precision of JS
// 'integers'.
@@ -441,14 +441,14 @@ class TokenizerBase extends TokenizerHelpers implements TokenSource {
_interpStack.depth = 0;
while (_index < _text.length) {
if (!TokenizerHelpers.isInterpIdentifierPart(
- _text.charCodeAt(_index++))) {
+ _text.codeUnitAt(_index++))) {
_index--;
break;
}
}
} else {
while (_index < _text.length) {
- if (!TokenizerHelpers.isIdentifierPart(_text.charCodeAt(_index++))) {
+ if (!TokenizerHelpers.isIdentifierPart(_text.codeUnitAt(_index++))) {
_index--;
break;
}
« no previous file with comments | « utils/template/tokenizer.dart ('k') | utils/template/tokenkind.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698