| 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, UnmatchedToken; | 7 import 'error_token.dart' show ErrorToken, UnmatchedToken; |
| 8 | 8 |
| 9 import '../../scanner/token.dart' | 9 import '../../scanner/token.dart' |
| 10 show Keyword, KeywordTokenWithComment, Token, TokenType; | 10 show Keyword, KeywordTokenWithComment, Token, TokenType; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 import 'characters.dart' show $LF, $STX; | 22 import 'characters.dart' show $LF, $STX; |
| 23 | 23 |
| 24 import 'abstract_scanner.dart' show AbstractScanner, closeBraceInfoFor; | 24 import 'abstract_scanner.dart' show AbstractScanner, closeBraceInfoFor; |
| 25 | 25 |
| 26 import '../util/link.dart' show Link; | 26 import '../util/link.dart' show Link; |
| 27 | 27 |
| 28 abstract class ArrayBasedScanner extends AbstractScanner { | 28 abstract class ArrayBasedScanner extends AbstractScanner { |
| 29 bool hasErrors = false; | 29 bool hasErrors = false; |
| 30 | 30 |
| 31 ArrayBasedScanner(bool includeComments, bool scanGenericMethodComments, | 31 ArrayBasedScanner(bool includeComments, bool scanGenericMethodComments, |
| 32 {int numberOfBytesHint}) | 32 bool scanLazyAssignmentOperators, {int numberOfBytesHint}) |
| 33 : super(includeComments, scanGenericMethodComments, | 33 : super(includeComments, scanGenericMethodComments, |
| 34 scanLazyAssignmentOperators, |
| 34 numberOfBytesHint: numberOfBytesHint); | 35 numberOfBytesHint: numberOfBytesHint); |
| 35 | 36 |
| 36 /** | 37 /** |
| 37 * The stack of open groups, e.g [: { ... ( .. :] | 38 * The stack of open groups, e.g [: { ... ( .. :] |
| 38 * Each BeginGroupToken has a pointer to the token where the group | 39 * Each BeginGroupToken has a pointer to the token where the group |
| 39 * ends. This field is set when scanning the end group token. | 40 * ends. This field is set when scanning the end group token. |
| 40 */ | 41 */ |
| 41 Link<BeginGroupToken> groupingStack = const Link<BeginGroupToken>(); | 42 Link<BeginGroupToken> groupingStack = const Link<BeginGroupToken>(); |
| 42 | 43 |
| 43 /** | 44 /** |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 // | | 295 // | |
| 295 // next | 296 // next |
| 296 // v | 297 // v |
| 297 // EOF | 298 // EOF |
| 298 TokenType type = closeBraceInfoFor(begin); | 299 TokenType type = closeBraceInfoFor(begin); |
| 299 appendToken(new SyntheticSymbolToken(type, tokenStart, comments)); | 300 appendToken(new SyntheticSymbolToken(type, tokenStart, comments)); |
| 300 begin.endGroup = tail; | 301 begin.endGroup = tail; |
| 301 appendErrorToken(new UnmatchedToken(begin)); | 302 appendErrorToken(new UnmatchedToken(begin)); |
| 302 } | 303 } |
| 303 } | 304 } |
| OLD | NEW |