OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 engine.incremental_scanner; | 5 library analyzer.src.generated.incremental_scanner; |
6 | 6 |
7 import "dart:math" as math; | 7 import "dart:math" as math; |
8 | 8 |
9 import 'package:analyzer/src/generated/engine.dart'; | 9 import 'package:analyzer/src/generated/engine.dart'; |
10 | 10 import 'package:analyzer/src/generated/error.dart'; |
11 import 'error.dart'; | 11 import 'package:analyzer/src/generated/scanner.dart'; |
12 import 'scanner.dart'; | 12 import 'package:analyzer/src/generated/source.dart'; |
13 import 'source.dart'; | 13 import 'package:analyzer/src/generated/utilities_collection.dart' show TokenMap; |
14 import 'utilities_collection.dart' show TokenMap; | |
15 | 14 |
16 /** | 15 /** |
17 * An `IncrementalScanner` is a scanner that scans a subset of a string and | 16 * An `IncrementalScanner` is a scanner that scans a subset of a string and |
18 * inserts the resulting tokens into the middle of an existing token stream. | 17 * inserts the resulting tokens into the middle of an existing token stream. |
19 */ | 18 */ |
20 class IncrementalScanner { | 19 class IncrementalScanner { |
21 /** | 20 /** |
22 * The source being scanned. | 21 * The source being scanned. |
23 */ | 22 */ |
24 final Source source; | 23 final Source source; |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 while (comment != null) { | 238 while (comment != null) { |
240 comment.offset += delta; | 239 comment.offset += delta; |
241 comment = comment.next; | 240 comment = comment.next; |
242 } | 241 } |
243 token = token.next; | 242 token = token.next; |
244 } | 243 } |
245 _tokenMap.put(token, token); | 244 _tokenMap.put(token, token); |
246 token.offset += delta; | 245 token.offset += delta; |
247 } | 246 } |
248 } | 247 } |
OLD | NEW |