| Index: pkg/compiler/lib/src/diagnostics/diagnostic_listener.dart
|
| diff --git a/pkg/compiler/lib/src/diagnostics/diagnostic_listener.dart b/pkg/compiler/lib/src/diagnostics/diagnostic_listener.dart
|
| index bd5750651d25f7d7a89643e8d9195becc526c9b3..3cb959fbfda533a91c1642bfd8cde2557d7569a4 100644
|
| --- a/pkg/compiler/lib/src/diagnostics/diagnostic_listener.dart
|
| +++ b/pkg/compiler/lib/src/diagnostics/diagnostic_listener.dart
|
| @@ -4,14 +4,10 @@
|
|
|
| library dart2js.diagnostic_listener;
|
|
|
| -import '../options.dart' show
|
| - DiagnosticOptions;
|
| -import 'source_span.dart' show
|
| - SourceSpan;
|
| -import 'spannable.dart' show
|
| - Spannable;
|
| -import '../elements/elements.dart' show
|
| - Element;
|
| +import '../options.dart' show DiagnosticOptions;
|
| +import 'source_span.dart' show SourceSpan;
|
| +import 'spannable.dart' show Spannable;
|
| +import '../elements/elements.dart' show Element;
|
| import 'messages.dart';
|
|
|
| // TODO(johnniwinther): Rename and cleanup this interface. Add severity enum.
|
| @@ -30,51 +26,39 @@ abstract class DiagnosticReporter {
|
| /// element.
|
| SourceSpan spanFromSpannable(Spannable node);
|
|
|
| - void reportErrorMessage(
|
| - Spannable spannable,
|
| - MessageKind messageKind,
|
| + void reportErrorMessage(Spannable spannable, MessageKind messageKind,
|
| [Map arguments = const {}]) {
|
| reportError(createMessage(spannable, messageKind, arguments));
|
| }
|
|
|
| - void reportError(
|
| - DiagnosticMessage message,
|
| + void reportError(DiagnosticMessage message,
|
| [List<DiagnosticMessage> infos = const <DiagnosticMessage>[]]);
|
|
|
| - void reportWarningMessage(
|
| - Spannable spannable,
|
| - MessageKind messageKind,
|
| + void reportWarningMessage(Spannable spannable, MessageKind messageKind,
|
| [Map arguments = const {}]) {
|
| reportWarning(createMessage(spannable, messageKind, arguments));
|
| }
|
|
|
| - void reportWarning(
|
| - DiagnosticMessage message,
|
| + void reportWarning(DiagnosticMessage message,
|
| [List<DiagnosticMessage> infos = const <DiagnosticMessage>[]]);
|
|
|
| - void reportHintMessage(
|
| - Spannable spannable,
|
| - MessageKind messageKind,
|
| + void reportHintMessage(Spannable spannable, MessageKind messageKind,
|
| [Map arguments = const {}]) {
|
| reportHint(createMessage(spannable, messageKind, arguments));
|
| }
|
|
|
| - void reportHint(
|
| - DiagnosticMessage message,
|
| + void reportHint(DiagnosticMessage message,
|
| [List<DiagnosticMessage> infos = const <DiagnosticMessage>[]]);
|
|
|
| -
|
| @deprecated
|
| void reportInfo(Spannable node, MessageKind errorCode,
|
| - [Map arguments = const {}]);
|
| + [Map arguments = const {}]);
|
|
|
| /// Set current element of this reporter to [element]. This is used for
|
| /// creating [SourceSpan] in [spanFromSpannable].
|
| withCurrentElement(Element element, f());
|
|
|
| - DiagnosticMessage createMessage(
|
| - Spannable spannable,
|
| - MessageKind messageKind,
|
| + DiagnosticMessage createMessage(Spannable spannable, MessageKind messageKind,
|
| [Map arguments = const {}]);
|
| }
|
|
|
| @@ -84,4 +68,4 @@ class DiagnosticMessage {
|
| final Message message;
|
|
|
| DiagnosticMessage(this.sourceSpan, this.spannable, this.message);
|
| -}
|
| +}
|
|
|