| 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' show Keyword, TokenType; | 9 import '../../scanner/token.dart' show Keyword, TokenType; |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 import 'characters.dart' show $LF, $STX; | 27 import 'characters.dart' show $LF, $STX; |
| 28 | 28 |
| 29 import 'abstract_scanner.dart' show AbstractScanner, closeBraceInfoFor; | 29 import 'abstract_scanner.dart' show AbstractScanner, closeBraceInfoFor; |
| 30 | 30 |
| 31 import '../util/link.dart' show Link; | 31 import '../util/link.dart' show Link; |
| 32 | 32 |
| 33 abstract class ArrayBasedScanner extends AbstractScanner { | 33 abstract class ArrayBasedScanner extends AbstractScanner { |
| 34 bool hasErrors = false; | 34 bool hasErrors = false; |
| 35 | 35 |
| 36 ArrayBasedScanner(bool includeComments, {int numberOfBytesHint}) | 36 ArrayBasedScanner(bool includeComments, bool scanGenericMethodComments, |
| 37 : super(includeComments, numberOfBytesHint: numberOfBytesHint); | 37 {int numberOfBytesHint}) |
| 38 : super(includeComments, scanGenericMethodComments, |
| 39 numberOfBytesHint: numberOfBytesHint); |
| 38 | 40 |
| 39 /** | 41 /** |
| 40 * The stack of open groups, e.g [: { ... ( .. :] | 42 * The stack of open groups, e.g [: { ... ( .. :] |
| 41 * Each BeginGroupToken has a pointer to the token where the group | 43 * Each BeginGroupToken has a pointer to the token where the group |
| 42 * ends. This field is set when scanning the end group token. | 44 * ends. This field is set when scanning the end group token. |
| 43 */ | 45 */ |
| 44 Link<BeginGroupToken> groupingStack = const Link<BeginGroupToken>(); | 46 Link<BeginGroupToken> groupingStack = const Link<BeginGroupToken>(); |
| 45 | 47 |
| 46 /** | 48 /** |
| 47 * Appends a fixed token whose kind and content is determined by [info]. | 49 * Appends a fixed token whose kind and content is determined by [info]. |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 // | | 299 // | |
| 298 // next | 300 // next |
| 299 // v | 301 // v |
| 300 // EOF | 302 // EOF |
| 301 TokenType info = closeBraceInfoFor(begin); | 303 TokenType info = closeBraceInfoFor(begin); |
| 302 appendToken(new SyntheticSymbolToken(info, tokenStart)); | 304 appendToken(new SyntheticSymbolToken(info, tokenStart)); |
| 303 begin.endGroup = tail; | 305 begin.endGroup = tail; |
| 304 appendErrorToken(new UnmatchedToken(begin)); | 306 appendErrorToken(new UnmatchedToken(begin)); |
| 305 } | 307 } |
| 306 } | 308 } |
| OLD | NEW |