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

Side by Side Diff: utils/template/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/template/token.dart ('k') | utils/template/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 TokenizerBase { 5 class Tokenizer extends TokenizerBase {
6 TokenKind tmplTokens; 6 TokenKind tmplTokens;
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 tmplTokens = new TokenKind(); 12 tmplTokens = new TokenKind();
13 } 13 }
14 14
15 int get startIndex() => _startIndex; 15 int get startIndex => _startIndex;
16 void set index(int idx) { 16 void set index(int idx) {
17 _index = idx; 17 _index = idx;
18 } 18 }
19 19
20 Token next([bool inTag = true]) { 20 Token next([bool inTag = true]) {
21 // keep track of our starting position 21 // keep track of our starting position
22 _startIndex = _index; 22 _startIndex = _index;
23 23
24 if (_interpStack != null && _interpStack.depth == 0) { 24 if (_interpStack != null && _interpStack.depth == 0) {
25 var istack = _interpStack; 25 var istack = _interpStack;
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 } 302 }
303 303
304 static bool isSlash(int c) { 304 static bool isSlash(int c) {
305 return (c == 47/* / */); 305 return (c == 47/* / */);
306 } 306 }
307 307
308 static bool isCloseTag(int c) { 308 static bool isCloseTag(int c) {
309 return (c == 62/* > */); 309 return (c == 62/* > */);
310 } 310 }
311 } 311 }
OLDNEW
« no previous file with comments | « utils/template/token.dart ('k') | utils/template/tokenkind.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698