Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Unified Diff: pkg/compiler/lib/src/diagnostics/diagnostic_listener.dart

Issue 2644843006: Use packages dart_parser, dart_scanner, and compiler_util. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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));

Powered by Google App Engine
This is Rietveld 408576698