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

Unified Diff: pkg/analyzer/lib/src/generated/error.dart

Issue 1418973002: Error reporting for spans. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Test fix. Created 5 years, 2 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
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/all_the_rest_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/error.dart
diff --git a/pkg/analyzer/lib/src/generated/error.dart b/pkg/analyzer/lib/src/generated/error.dart
index 6b4d93efa9fd29bb73c54fd50c96a0b787efdb32..eac324c8dd64f251c560a84c8d3629437ca61241 100644
--- a/pkg/analyzer/lib/src/generated/error.dart
+++ b/pkg/analyzer/lib/src/generated/error.dart
@@ -6,6 +6,8 @@ library engine.error;
import 'dart:collection';
+import 'package:source_span/source_span.dart';
+
import 'ast.dart' show AstNode;
import 'element.dart';
import 'java_core.dart';
@@ -2663,6 +2665,15 @@ class ErrorReporter {
}
/**
+ * Report an error with the given [errorCode] and [arguments]. The location of
+ * the error is specified by the given [span].
+ */
+ void reportErrorForSpan(ErrorCode errorCode, SourceSpan span,
+ [List<Object> arguments]) {
+ reportErrorForOffset(errorCode, span.start.offset, span.length, arguments);
+ }
+
+ /**
* Report an error with the given [errorCode] and [arguments]. The [token] is
* used to compute the location of the error.
*/
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/all_the_rest_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698