OLD | NEW |
(Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 library dart2js.diagnostic_reporter.helper; |
| 6 |
| 7 import 'package:compiler/src/diagnostics/diagnostic_listener.dart'; |
| 8 import 'package:compiler/src/diagnostics/messages.dart'; |
| 9 import 'package:compiler/src/diagnostics/spannable.dart'; |
| 10 import 'package:compiler/src/diagnostics/source_span.dart'; |
| 11 import 'package:compiler/src/elements/elements.dart'; |
| 12 |
| 13 abstract class DiagnosticReporterWrapper extends DiagnosticReporter { |
| 14 DiagnosticReporter get reporter; |
| 15 |
| 16 @override |
| 17 DiagnosticMessage createMessage( |
| 18 Spannable spannable, |
| 19 MessageKind messageKind, |
| 20 [Map arguments = const {}]) { |
| 21 return reporter.createMessage(spannable, messageKind, arguments); |
| 22 } |
| 23 |
| 24 @override |
| 25 internalError(Spannable spannable, message) { |
| 26 return reporter.internalError(spannable, message); |
| 27 } |
| 28 |
| 29 @override |
| 30 void log(message) { |
| 31 return reporter.log(message); |
| 32 } |
| 33 |
| 34 @override |
| 35 DiagnosticOptions get options => reporter.options; |
| 36 |
| 37 @override |
| 38 void reportError( |
| 39 DiagnosticMessage message, |
| 40 [List<DiagnosticMessage> infos = const <DiagnosticMessage> []]) { |
| 41 reporter.reportError(message, infos); |
| 42 } |
| 43 |
| 44 @override |
| 45 void reportHint( |
| 46 DiagnosticMessage message, |
| 47 [List<DiagnosticMessage> infos = const <DiagnosticMessage> []]) { |
| 48 reporter.reportHint(message, infos); |
| 49 } |
| 50 |
| 51 @override |
| 52 void reportInfo( |
| 53 Spannable node, |
| 54 MessageKind errorCode, |
| 55 [Map arguments = const {}]) { |
| 56 reporter.reportInfo(node, errorCode, arguments); |
| 57 } |
| 58 |
| 59 @override |
| 60 void reportWarning( |
| 61 DiagnosticMessage message, |
| 62 [List<DiagnosticMessage> infos = const <DiagnosticMessage> []]) { |
| 63 reporter.reportWarning(message, infos); |
| 64 } |
| 65 |
| 66 @override |
| 67 SourceSpan spanFromSpannable(Spannable node) { |
| 68 return reporter.spanFromSpannable(node); |
| 69 } |
| 70 |
| 71 @override |
| 72 withCurrentElement(Element element, f()) { |
| 73 return reporter.withCurrentElement(element, f); |
| 74 } |
| 75 } |
OLD | NEW |