| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.parser.diet.task; | 5 library dart2js.parser.diet.task; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/backend_api.dart' show Backend; | 8 import '../common/backend_api.dart' show Backend; |
| 9 import '../common/tasks.dart' show CompilerTask, Measurer; | 9 import '../common/tasks.dart' show CompilerTask, Measurer; |
| 10 import '../elements/elements.dart' show CompilationUnitElement; | 10 import '../elements/elements.dart' show CompilationUnitElement; |
| 11 import '../id_generator.dart'; | 11 import '../id_generator.dart'; |
| 12 import '../options.dart' show ParserOptions; |
| 12 import '../tokens/token.dart' show Token; | 13 import '../tokens/token.dart' show Token; |
| 13 | 14 import 'element_listener.dart' show ElementListener, ScannerOptions; |
| 14 import 'listener.dart' show ParserError; | 15 import 'listener.dart' show ParserError; |
| 15 import 'element_listener.dart' show ElementListener, ScannerOptions; | |
| 16 import '../options.dart' show ParserOptions; | |
| 17 import 'partial_parser.dart' show PartialParser; | 16 import 'partial_parser.dart' show PartialParser; |
| 18 | 17 |
| 19 class DietParserTask extends CompilerTask { | 18 class DietParserTask extends CompilerTask { |
| 20 final ParserOptions _parserOptions; | 19 final ParserOptions _parserOptions; |
| 21 final IdGenerator _idGenerator; | 20 final IdGenerator _idGenerator; |
| 22 final Backend _backend; | 21 final Backend _backend; |
| 23 final DiagnosticReporter _reporter; | 22 final DiagnosticReporter _reporter; |
| 24 | 23 |
| 25 DietParserTask(this._parserOptions, this._idGenerator, this._backend, | 24 DietParserTask(this._parserOptions, this._idGenerator, this._backend, |
| 26 this._reporter, Measurer measurer) | 25 this._reporter, Measurer measurer) |
| (...skipping 11 matching lines...) Expand all Loading... |
| 38 try { | 37 try { |
| 39 parser.parseUnit(tokens); | 38 parser.parseUnit(tokens); |
| 40 } on ParserError catch (_) { | 39 } on ParserError catch (_) { |
| 41 // TODO(johnniwinther): assert that the error was reported once there is | 40 // TODO(johnniwinther): assert that the error was reported once there is |
| 42 // a [hasErrorBeenReported] field in [DiagnosticReporter] | 41 // a [hasErrorBeenReported] field in [DiagnosticReporter] |
| 43 // The error should have already been reported by the parser. | 42 // The error should have already been reported by the parser. |
| 44 } | 43 } |
| 45 }); | 44 }); |
| 46 } | 45 } |
| 47 } | 46 } |
| OLD | NEW |