| 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 dart2js.scanner.array_based; | 5 library dart2js.scanner.array_based; |
| 6 | 6 |
| 7 import '../io/source_file.dart' show SourceFile; | 7 import '../io/source_file.dart' show SourceFile; |
| 8 import '../tokens/keyword.dart' show Keyword; | 8 import '../tokens/keyword.dart' show Keyword; |
| 9 import '../tokens/precedence.dart' show PrecedenceInfo; | 9 import '../tokens/precedence.dart' show PrecedenceInfo; |
| 10 import '../tokens/precedence_constants.dart' as Precedence | 10 import '../tokens/precedence_constants.dart' as Precedence |
| 11 show COMMENT_INFO, EOF_INFO; | 11 show COMMENT_INFO, EOF_INFO; |
| 12 import '../tokens/token.dart' | 12 import '../tokens/token.dart' |
| 13 show BeginGroupToken, ErrorToken, KeywordToken, SymbolToken, Token; | 13 show BeginGroupToken, ErrorToken, KeywordToken, SymbolToken, Token; |
| 14 import '../tokens/token_constants.dart' as Tokens | 14 import '../tokens/token_constants.dart' as Tokens |
| 15 show LT_TOKEN, OPEN_CURLY_BRACKET_TOKEN, STRING_INTERPOLATION_TOKEN; | 15 show LT_TOKEN, OPEN_CURLY_BRACKET_TOKEN, STRING_INTERPOLATION_TOKEN; |
| 16 import '../util/characters.dart' show $LF, $STX; | 16 import '../util/characters.dart' show $LF, $STX; |
| 17 import '../util/util.dart' show Link; | 17 import '../util/util.dart' show Link; |
| 18 | |
| 19 import 'scanner.dart' show AbstractScanner; | 18 import 'scanner.dart' show AbstractScanner; |
| 20 | 19 |
| 21 abstract class ArrayBasedScanner extends AbstractScanner { | 20 abstract class ArrayBasedScanner extends AbstractScanner { |
| 22 ArrayBasedScanner(SourceFile file, bool includeComments) | 21 ArrayBasedScanner(SourceFile file, bool includeComments) |
| 23 : super(file, includeComments); | 22 : super(file, includeComments); |
| 24 | 23 |
| 25 /** | 24 /** |
| 26 * The stack of open groups, e.g [: { ... ( .. :] | 25 * The stack of open groups, e.g [: { ... ( .. :] |
| 27 * Each BeginGroupToken has a pointer to the token where the group | 26 * Each BeginGroupToken has a pointer to the token where the group |
| 28 * ends. This field is set when scanning the end group token. | 27 * ends. This field is set when scanning the end group token. |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 * something which cannot possibly be part of a type parameter/argument | 224 * something which cannot possibly be part of a type parameter/argument |
| 226 * list, like the '=' in the above example. | 225 * list, like the '=' in the above example. |
| 227 */ | 226 */ |
| 228 void discardOpenLt() { | 227 void discardOpenLt() { |
| 229 while (!groupingStack.isEmpty && | 228 while (!groupingStack.isEmpty && |
| 230 identical(groupingStack.head.kind, Tokens.LT_TOKEN)) { | 229 identical(groupingStack.head.kind, Tokens.LT_TOKEN)) { |
| 231 groupingStack = groupingStack.tail; | 230 groupingStack = groupingStack.tail; |
| 232 } | 231 } |
| 233 } | 232 } |
| 234 } | 233 } |
| OLD | NEW |