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 library fasta.scanner.array_based_scanner; | 5 library fasta.scanner.array_based_scanner; |
6 | 6 |
7 import 'error_token.dart' show ErrorToken; | 7 import 'error_token.dart' show ErrorToken; |
8 | 8 |
9 import 'keyword.dart' show Keyword; | 9 import 'keyword.dart' show Keyword; |
10 | 10 |
11 import 'precedence.dart' show COMMENT_INFO, EOF_INFO, PrecedenceInfo; | 11 import 'precedence.dart' show COMMENT_INFO, EOF_INFO, PrecedenceInfo; |
12 | 12 |
13 import 'token.dart' show BeginGroupToken, KeywordToken, SymbolToken, Token; | 13 import 'token.dart' show BeginGroupToken, KeywordToken, SymbolToken, Token; |
14 | 14 |
15 import 'token_constants.dart' | 15 import 'token_constants.dart' |
16 show LT_TOKEN, OPEN_CURLY_BRACKET_TOKEN, STRING_INTERPOLATION_TOKEN; | 16 show LT_TOKEN, OPEN_CURLY_BRACKET_TOKEN, STRING_INTERPOLATION_TOKEN; |
17 | 17 |
18 import 'characters.dart' show $LF, $STX; | 18 import 'characters.dart' show $LF, $STX; |
19 | 19 |
20 import 'abstract_scanner.dart' show AbstractScanner; | 20 import 'abstract_scanner.dart' show AbstractScanner; |
21 | 21 |
22 import 'package:front_end/src/fasta/util/link.dart' show Link; | 22 import '../util/link.dart' show Link; |
23 | 23 |
24 abstract class ArrayBasedScanner extends AbstractScanner { | 24 abstract class ArrayBasedScanner extends AbstractScanner { |
25 bool hasErrors = false; | 25 bool hasErrors = false; |
26 | 26 |
27 ArrayBasedScanner(bool includeComments, {int numberOfBytesHint}) | 27 ArrayBasedScanner(bool includeComments, {int numberOfBytesHint}) |
28 : super(includeComments, numberOfBytesHint: numberOfBytesHint); | 28 : super(includeComments, numberOfBytesHint: numberOfBytesHint); |
29 | 29 |
30 /** | 30 /** |
31 * The stack of open groups, e.g [: { ... ( .. :] | 31 * The stack of open groups, e.g [: { ... ( .. :] |
32 * Each BeginGroupToken has a pointer to the token where the group | 32 * Each BeginGroupToken has a pointer to the token where the group |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 * something which cannot possibly be part of a type parameter/argument | 229 * something which cannot possibly be part of a type parameter/argument |
230 * list, like the '=' in the above example. | 230 * list, like the '=' in the above example. |
231 */ | 231 */ |
232 void discardOpenLt() { | 232 void discardOpenLt() { |
233 while (!groupingStack.isEmpty && | 233 while (!groupingStack.isEmpty && |
234 identical(groupingStack.head.kind, LT_TOKEN)) { | 234 identical(groupingStack.head.kind, LT_TOKEN)) { |
235 groupingStack = groupingStack.tail; | 235 groupingStack = groupingStack.tail; |
236 } | 236 } |
237 } | 237 } |
238 } | 238 } |
OLD | NEW |