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.diagnostic_reporter.helper; | 5 library dart2js.diagnostic_reporter.helper; |
6 | 6 |
7 import 'package:compiler/src/diagnostics/diagnostic_listener.dart'; | 7 import 'package:compiler/src/diagnostics/diagnostic_listener.dart'; |
8 import 'package:compiler/src/diagnostics/messages.dart'; | 8 import 'package:compiler/src/diagnostics/messages.dart'; |
9 import 'package:compiler/src/diagnostics/source_span.dart'; | 9 import 'package:compiler/src/diagnostics/source_span.dart'; |
10 import 'package:compiler/src/diagnostics/spannable.dart'; | 10 import 'package:compiler/src/diagnostics/spannable.dart'; |
11 import 'package:compiler/src/elements/elements.dart'; | 11 import 'package:compiler/src/elements/entities.dart'; |
12 import 'package:front_end/src/fasta/scanner.dart'; | 12 import 'package:front_end/src/fasta/scanner.dart'; |
13 import 'options_helper.dart'; | 13 import 'options_helper.dart'; |
14 | 14 |
15 abstract class DiagnosticReporterWrapper extends DiagnosticReporter { | 15 abstract class DiagnosticReporterWrapper extends DiagnosticReporter { |
16 DiagnosticReporter get reporter; | 16 DiagnosticReporter get reporter; |
17 | 17 |
18 @override | 18 @override |
19 DiagnosticMessage createMessage(Spannable spannable, MessageKind messageKind, | 19 DiagnosticMessage createMessage(Spannable spannable, MessageKind messageKind, |
20 [Map arguments = const {}]) { | 20 [Map arguments = const {}]) { |
21 return reporter.createMessage(spannable, messageKind, arguments); | 21 return reporter.createMessage(spannable, messageKind, arguments); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 @override | 61 @override |
62 SourceSpan spanFromSpannable(Spannable node) { | 62 SourceSpan spanFromSpannable(Spannable node) { |
63 return reporter.spanFromSpannable(node); | 63 return reporter.spanFromSpannable(node); |
64 } | 64 } |
65 | 65 |
66 @override | 66 @override |
67 SourceSpan spanFromToken(Token token) => reporter.spanFromToken(token); | 67 SourceSpan spanFromToken(Token token) => reporter.spanFromToken(token); |
68 | 68 |
69 @override | 69 @override |
70 withCurrentElement(Element element, f()) { | 70 withCurrentElement(Entity element, f()) { |
71 return reporter.withCurrentElement(element, f); | 71 return reporter.withCurrentElement(element, f); |
72 } | 72 } |
73 | 73 |
74 @override | 74 @override |
75 bool get hasReportedError => reporter.hasReportedError; | 75 bool get hasReportedError => reporter.hasReportedError; |
76 } | 76 } |
OLD | NEW |