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

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

Issue 10919146: Get rid of a lot of () for getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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/token.dart ('k') | utils/css/tokenkind.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 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class Tokenizer extends CSSTokenizerBase { 5 class Tokenizer extends CSSTokenizerBase {
6 TokenKind cssTokens; 6 TokenKind cssTokens;
7 7
8 bool _selectorParsing; 8 bool _selectorParsing;
9 9
10 Tokenizer(SourceFile source, bool skipWhitespace, [int index = 0]) 10 Tokenizer(SourceFile source, bool skipWhitespace, [int index = 0])
11 : super(source, skipWhitespace, index), _selectorParsing = false { 11 : super(source, skipWhitespace, index), _selectorParsing = false {
12 cssTokens = new TokenKind(); 12 cssTokens = new TokenKind();
13 } 13 }
14 14
15 int get startIndex() => _startIndex; 15 int get startIndex => _startIndex;
16 16
17 Token next() { 17 Token next() {
18 // keep track of our starting position 18 // keep track of our starting position
19 _startIndex = _index; 19 _startIndex = _index;
20 20
21 if (_interpStack != null && _interpStack.depth == 0) { 21 if (_interpStack != null && _interpStack.depth == 0) {
22 var istack = _interpStack; 22 var istack = _interpStack;
23 _interpStack = _interpStack.pop(); 23 _interpStack = _interpStack.pop();
24 24
25 /* TODO(terry): Enable for variable and string interpolation. 25 /* TODO(terry): Enable for variable and string interpolation.
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 static bool isHexDigit(int c) { 306 static bool isHexDigit(int c) {
307 return (isDigit(c) || (c >= 97/*a*/ && c <= 102/*f*/) 307 return (isDigit(c) || (c >= 97/*a*/ && c <= 102/*f*/)
308 || (c >= 65/*A*/ && c <= 70/*F*/)); 308 || (c >= 65/*A*/ && c <= 70/*F*/));
309 } 309 }
310 310
311 static bool isIdentifierPart(int c) { 311 static bool isIdentifierPart(int c) {
312 return (isIdentifierStart(c) || isDigit(c) || c == 45 /*-*/); 312 return (isIdentifierStart(c) || isDigit(c) || c == 45 /*-*/);
313 } 313 }
314 } 314 }
315 315
OLDNEW
« no previous file with comments | « utils/css/token.dart ('k') | utils/css/tokenkind.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698