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

Unified Diff: utils/css/tokenkind.dart

Issue 9168008: Enabled CSS tests, added CSS tests to buildbot, fixed tooling with nodejs, and added more tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: More coding convention changes (consistency). Created 8 years, 11 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/parser.dart ('k') | utils/css/tool.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/css/tokenkind.dart
diff --git a/utils/css/tokenkind.dart b/utils/css/tokenkind.dart
index 6273ee7872adafdc02b5f29420acb26168a7513e..374b2976cb93fe7b603026c9cc18116afd8c8724 100644
--- a/utils/css/tokenkind.dart
+++ b/utils/css/tokenkind.dart
@@ -377,12 +377,12 @@ class TokenKind {
*/
static int matchList(var identList, String tokenField, String text,
int offset, int length) {
- for (var entry in identList) {
+ for (final entry in identList) {
String ident = entry['value'];
if (length == ident.length) {
int idx = offset;
bool match = true;
- for (var identIdx = 0; identIdx < ident.length; identIdx++) {
+ for (final identIdx = 0; identIdx < ident.length; identIdx++) {
int identChar = ident.charCodeAt(identIdx);
int char = text.charCodeAt(idx++);
// Compare lowercase to lowercase then check if char is uppercase.
@@ -425,7 +425,7 @@ class TokenKind {
if (unitTokenToFind == TokenKind.PERCENT) {
return '%';
} else {
- for (var entry in _UNITS) {
+ for (final entry in _UNITS) {
int unit = entry['unit'];
if (unit == unitTokenToFind) {
return entry['value'];
@@ -442,12 +442,12 @@ class TokenKind {
*/
static int matchColorName(String text) {
int length = text.length;
- for (var entry in _EXTENDED_COLOR_NAMES) {
+ for (final entry in _EXTENDED_COLOR_NAMES) {
String ident = entry['name'];
if (length == ident.length) {
int idx = 0;
bool match = true;
- for (var identIdx = 0; identIdx < ident.length; identIdx++) {
+ for (final identIdx = 0; identIdx < ident.length; identIdx++) {
int identChar = ident.charCodeAt(identIdx);
int char = text.charCodeAt(idx++);
// Compare lowercase to lowercase then check if char is uppercase.
@@ -485,7 +485,7 @@ class TokenKind {
}
StringBuffer invertResult = new StringBuffer();
- for (var idx = result.length - 1; idx >= 0; idx--) {
+ for (final idx = result.length - 1; idx >= 0; idx--) {
invertResult.add(result[idx]);
}
return invertResult.toString();
« no previous file with comments | « utils/css/parser.dart ('k') | utils/css/tool.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698