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

Unified Diff: utils/css/tokenizer.dart

Issue 12282038: Remove deprecated string features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
Index: utils/css/tokenizer.dart
diff --git a/utils/css/tokenizer.dart b/utils/css/tokenizer.dart
index fccb3c040501b9beaf73e93041c9576f17cd79f6..63573dff140af5e9d653bc44961f909a3e4cf30a 100644
--- a/utils/css/tokenizer.dart
+++ b/utils/css/tokenizer.dart
@@ -191,8 +191,8 @@ class Tokenizer extends CSSTokenizerBase {
// Need to override so CSS version of isIdentifierPart is used.
Token finishIdentifier(int ch) {
while (_index < _text.length) {
-// if (!TokenizerHelpers.isIdentifierPart(_text.charCodeAt(_index++))) {
- if (!TokenizerHelpers.isIdentifierPart(_text.charCodeAt(_index))) {
+// if (!TokenizerHelpers.isIdentifierPart(_text.codeUnitAt(_index++))) {
+ if (!TokenizerHelpers.isIdentifierPart(_text.codeUnitAt(_index))) {
// _index--;
break;
} else {
@@ -211,7 +211,7 @@ class Tokenizer extends CSSTokenizerBase {
}
Token finishImportant() {
-
+
}
Token finishNumber() {
@@ -233,7 +233,7 @@ class Tokenizer extends CSSTokenizerBase {
bool maybeEatDigit() {
if (_index < _text.length
- && TokenizerHelpers.isDigit(_text.charCodeAt(_index))) {
+ && TokenizerHelpers.isDigit(_text.codeUnitAt(_index))) {
_index += 1;
return true;
}
@@ -242,7 +242,7 @@ class Tokenizer extends CSSTokenizerBase {
void eatHexDigits() {
while (_index < _text.length) {
- if (TokenizerHelpers.isHexDigit(_text.charCodeAt(_index))) {
+ if (TokenizerHelpers.isHexDigit(_text.codeUnitAt(_index))) {
_index += 1;
} else {
return;
@@ -252,7 +252,7 @@ class Tokenizer extends CSSTokenizerBase {
bool maybeEatHexDigit() {
if (_index < _text.length
- && TokenizerHelpers.isHexDigit(_text.charCodeAt(_index))) {
+ && TokenizerHelpers.isHexDigit(_text.codeUnitAt(_index))) {
_index += 1;
return true;
}
@@ -293,7 +293,7 @@ class Tokenizer extends CSSTokenizerBase {
/** Static helper methods. */
/** Static helper methods. */
class TokenizerHelpers {
-
+
static bool isIdentifierStart(int c) {
return ((c >= 97/*a*/ && c <= 122/*z*/) || (c >= 65/*A*/ && c <= 90/*Z*/) ||
c == 95/*_*/ || c == 45 /*-*/);

Powered by Google App Engine
This is Rietveld 408576698