| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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.task; | 5 library dart2js.scanner.task; |
| 6 | 6 |
| 7 import '../common/tasks.dart' show CompilerTask, Measurer; | 7 import '../common/tasks.dart' show CompilerTask, Measurer; |
| 8 import '../diagnostics/diagnostic_listener.dart' show DiagnosticReporter; | 8 import '../diagnostics/diagnostic_listener.dart' show DiagnosticReporter; |
| 9 import '../elements/elements.dart' show CompilationUnitElement, LibraryElement; | 9 import '../elements/elements.dart' show CompilationUnitElement, LibraryElement; |
| 10 import '../parser/diet_parser_task.dart' show DietParserTask; |
| 10 import '../script.dart' show Script; | 11 import '../script.dart' show Script; |
| 11 import '../parser/diet_parser_task.dart' show DietParserTask; | |
| 12 import '../tokens/token.dart' show Token; | 12 import '../tokens/token.dart' show Token; |
| 13 import '../tokens/token_constants.dart' as Tokens show COMMENT_TOKEN, EOF_TOKEN; | 13 import '../tokens/token_constants.dart' as Tokens show COMMENT_TOKEN, EOF_TOKEN; |
| 14 import '../tokens/token_map.dart' show TokenMap; | 14 import '../tokens/token_map.dart' show TokenMap; |
| 15 | |
| 16 import 'scanner.dart' show Scanner; | 15 import 'scanner.dart' show Scanner; |
| 17 import 'string_scanner.dart' show StringScanner; | 16 import 'string_scanner.dart' show StringScanner; |
| 18 | 17 |
| 19 class ScannerTask extends CompilerTask { | 18 class ScannerTask extends CompilerTask { |
| 20 final DietParserTask _dietParser; | 19 final DietParserTask _dietParser; |
| 21 final bool _preserveComments; | 20 final bool _preserveComments; |
| 22 final TokenMap _commentMap; | 21 final TokenMap _commentMap; |
| 23 final DiagnosticReporter reporter; | 22 final DiagnosticReporter reporter; |
| 24 | 23 |
| 25 ScannerTask(this._dietParser, this.reporter, Measurer measurer, | 24 ScannerTask(this._dietParser, this.reporter, Measurer measurer, |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 } else { | 91 } else { |
| 93 prevToken.next = currentToken; | 92 prevToken.next = currentToken; |
| 94 } | 93 } |
| 95 } | 94 } |
| 96 prevToken = currentToken; | 95 prevToken = currentToken; |
| 97 currentToken = currentToken.next; | 96 currentToken = currentToken.next; |
| 98 } | 97 } |
| 99 return firstToken; | 98 return firstToken; |
| 100 } | 99 } |
| 101 } | 100 } |
| OLD | NEW |