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

Unified Diff: pkg/analyzer/lib/src/dart/analysis/file_state.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
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/driver.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/analysis/file_state.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index 1937d59c5abb684d46f8d4afbd1e04cab22f07bf..d828e31fe48fe486ec2ff2467c0bdf2dd0e1c776 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -78,6 +78,7 @@ class FileState {
String _content;
String _contentHash;
+ LineInfo _lineInfo;
UnlinkedUnit _unlinked;
List<int> _apiSignature;
@@ -106,6 +107,11 @@ class FileState {
String get contentHash => _contentHash;
/**
+ * Return information about line in the file.
+ */
+ LineInfo get lineInfo => _lineInfo;
+
+ /**
* Return the list of all direct dependencies.
*/
List<FileState> get dependencies => _dependencies;
@@ -177,6 +183,7 @@ class FileState {
}
// Read the unlinked bundle.
_unlinked = new UnlinkedUnit.fromBuffer(bytes);
+ _lineInfo = new LineInfo(_unlinked.lineStarts);
List<int> newApiSignature = _unlinked.apiSignature;
bool apiSignatureChanged = _apiSignature != null &&
!_equalByteLists(_apiSignature, newApiSignature);
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/driver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698