| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |