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 part of scanner_implementation; | |
6 | |
7 abstract | 5 abstract |
8 class ArrayBasedScanner<S extends SourceString> extends AbstractScanner<S> { | 6 class ArrayBasedScanner<S extends SourceString> extends AbstractScanner<S> { |
9 int get charOffset => byteOffset + extraCharOffset; | 7 int get charOffset => byteOffset + extraCharOffset; |
10 final Token tokens; | 8 final Token tokens; |
11 Token tail; | 9 Token tail; |
12 int tokenStart; | 10 int tokenStart; |
13 int byteOffset; | 11 int byteOffset; |
14 final bool includeComments; | 12 final bool includeComments; |
15 | 13 |
16 /** Since the input is UTF8, some characters are represented by more | 14 /** Since the input is UTF8, some characters are represented by more |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 void discardOpenLt() { | 174 void discardOpenLt() { |
177 while (!groupingStack.isEmpty() | 175 while (!groupingStack.isEmpty() |
178 && identical(groupingStack.head.kind, LT_TOKEN)) { | 176 && identical(groupingStack.head.kind, LT_TOKEN)) { |
179 groupingStack = groupingStack.tail; | 177 groupingStack = groupingStack.tail; |
180 } | 178 } |
181 } | 179 } |
182 | 180 |
183 // TODO(ahe): make class abstract instead of adding an abstract method. | 181 // TODO(ahe): make class abstract instead of adding an abstract method. |
184 abstract peek(); | 182 abstract peek(); |
185 } | 183 } |
OLD | NEW |