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

Unified Diff: pkg/analyzer/lib/src/dart/analysis/driver.dart

Issue 2468223003: Include LineInfo into AnalysisResult to allow reporting errors with lines/columns. (Closed)
Patch Set: Created 4 years, 1 month 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/analyzer/lib/src/dart/analysis/driver.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index 6c088742a6b280d9233e659373de406ba6627f39..8eb9758589c580068858a171b88ad5d0ebd462e9 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -468,6 +468,7 @@ class AnalysisDriver {
file.uri,
withUnit ? file.content : null,
file.contentHash,
+ file.lineInfo,
resolvedUnit,
errors);
} finally {
@@ -612,8 +613,8 @@ class AnalysisDriver {
error.message,
error.correction))
.toList();
- return new AnalysisResult(
- file.path, file.uri, null, file.contentHash, null, errors);
+ return new AnalysisResult(file.path, file.uri, null, file.contentHash,
+ file.lineInfo, null, errors);
}
return null;
}
@@ -729,6 +730,11 @@ class AnalysisResult {
final String contentHash;
/**
+ * Information about lines in the [content].
+ */
+ final LineInfo lineInfo;
+
+ /**
* The fully resolved compilation unit for the [content].
*/
final CompilationUnit unit;
@@ -738,8 +744,8 @@ class AnalysisResult {
*/
final List<AnalysisError> errors;
- AnalysisResult(this.path, this.uri, this.content, this.contentHash, this.unit,
- this.errors);
+ AnalysisResult(this.path, this.uri, this.content, this.contentHash,
+ this.lineInfo, this.unit, this.errors);
}
/**
« no previous file with comments | « pkg/analysis_server/lib/src/computer/new_notifications.dart ('k') | pkg/analyzer/lib/src/dart/analysis/file_state.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698