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

Side by Side Diff: utils/css/parser.dart

Issue 9728009: Template bug fixes and new features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Undid css.status change Created 8 years, 9 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 | « utils/css/cssoptions.dart ('k') | utils/template/codegen.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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 } else { 753 } else {
754 _errorExpected("hex number"); 754 _errorExpected("hex number");
755 } 755 }
756 756
757 try { 757 try {
758 int hexValue = parseHex(hexText); 758 int hexValue = parseHex(hexText);
759 return new HexColorTerm(hexValue, hexText, _makeSpan(start)); 759 return new HexColorTerm(hexValue, hexText, _makeSpan(start));
760 } catch (HexNumberException hne) { 760 } catch (HexNumberException hne) {
761 _error('Bad hex number', _makeSpan(start)); 761 _error('Bad hex number', _makeSpan(start));
762 } 762 }
763 break;
763 case TokenKind.INTEGER: 764 case TokenKind.INTEGER:
764 t = _next(); 765 t = _next();
765 value = Math.parseInt("${unary}${t.text}"); 766 value = Math.parseInt("${unary}${t.text}");
766 break; 767 break;
767 case TokenKind.DOUBLE: 768 case TokenKind.DOUBLE:
768 t = _next(); 769 t = _next();
769 value = Math.parseDouble("${unary}${t.text}"); 770 value = Math.parseDouble("${unary}${t.text}");
770 break; 771 break;
771 case TokenKind.SINGLE_QUOTE: 772 case TokenKind.SINGLE_QUOTE:
772 case TokenKind.DOUBLE_QUOTE: 773 case TokenKind.DOUBLE_QUOTE:
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 1008
1008 return result; 1009 return result;
1009 } 1010 }
1010 } 1011 }
1011 1012
1012 /** Not a hex number. */ 1013 /** Not a hex number. */
1013 class HexNumberException implements Exception { 1014 class HexNumberException implements Exception {
1014 HexNumberException(); 1015 HexNumberException();
1015 } 1016 }
1016 1017
OLDNEW
« no previous file with comments | « utils/css/cssoptions.dart ('k') | utils/template/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698