| 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 e12c09c824f73d04916ef5e165e77c79c99d11b9..52dee7c75b5fc37aceff33d9e0c754edaabd759d 100644
|
| --- a/pkg/compiler/lib/src/diagnostics/diagnostic_listener.dart
|
| +++ b/pkg/compiler/lib/src/diagnostics/diagnostic_listener.dart
|
| @@ -4,6 +4,7 @@
|
|
|
| library dart2js.diagnostic_listener;
|
|
|
| +import 'package:dart_scanner/dart_scanner.dart' show Token;
|
| import '../elements/elements.dart' show Element;
|
| import '../options.dart' show DiagnosticOptions;
|
| import 'messages.dart';
|
| @@ -21,11 +22,16 @@ abstract class DiagnosticReporter {
|
|
|
| /// Creates a [SourceSpan] for [node] in scope of the current element.
|
| ///
|
| - /// If [node] is a [Node] or [Token] we assert in checked mode that the
|
| - /// corresponding tokens can be found within the tokens of the current
|
| - /// element.
|
| + /// If [node] is a [Node] we assert in checked mode that the corresponding
|
| + /// tokens can be found within the tokens of the current element.
|
| SourceSpan spanFromSpannable(Spannable node);
|
|
|
| + /// Creates a [SourceSpan] for [token] in scope of the current element.
|
| + ///
|
| + /// In checked mode we assert that the token can be found within the tokens
|
| + /// of the current element.
|
| + SourceSpan spanFromToken(Token token);
|
| +
|
| void reportErrorMessage(Spannable spannable, MessageKind messageKind,
|
| [Map arguments = const {}]) {
|
| reportError(createMessage(spannable, messageKind, arguments));
|
|
|