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

Side by Side Diff: utils/css/parser.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/dom/src/KeyboardEventController.dart ('k') | utils/css/tokenizer.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 3
4 /** 4 /**
5 * A simple recursive descent parser for CSS. 5 * A simple recursive descent parser for CSS.
6 */ 6 */
7 class Parser { 7 class Parser {
8 Tokenizer tokenizer; 8 Tokenizer tokenizer;
9 9
10 var _fs; // If non-null filesystem to read files. 10 var _fs; // If non-null filesystem to read files.
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 return c - 55; 992 return c - 55;
993 } else { 993 } else {
994 return -1; 994 return -1;
995 } 995 }
996 } 996 }
997 997
998 static int parseHex(String hex) { 998 static int parseHex(String hex) {
999 var result = 0; 999 var result = 0;
1000 1000
1001 for (int i = 0; i < hex.length; i++) { 1001 for (int i = 0; i < hex.length; i++) {
1002 var digit = _hexDigit(hex.charCodeAt(i)); 1002 var digit = _hexDigit(hex.codeUnitAt(i));
1003 if (digit < 0) { 1003 if (digit < 0) {
1004 throw new HexNumberException(); 1004 throw new HexNumberException();
1005 } 1005 }
1006 result = (result << 4) + digit; 1006 result = (result << 4) + digit;
1007 } 1007 }
1008 1008
1009 return result; 1009 return result;
1010 } 1010 }
1011 } 1011 }
1012 1012
1013 /** Not a hex number. */ 1013 /** Not a hex number. */
1014 class HexNumberException implements Exception { 1014 class HexNumberException implements Exception {
1015 HexNumberException(); 1015 HexNumberException();
1016 } 1016 }
1017 1017
OLDNEW
« no previous file with comments | « tools/dom/src/KeyboardEventController.dart ('k') | utils/css/tokenizer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698