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

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

Issue 2875323002: Remove unintentional dependency on analysis_server (Closed)
Patch Set: Created 3 years, 7 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/analyzer/lib/src/generated/source.dart
diff --git a/pkg/analyzer/lib/src/generated/source.dart b/pkg/analyzer/lib/src/generated/source.dart
index 262bfe3b2d79c0b3b4398035afc2a321d4757b1c..4237caf1850e172b9c1f3c828ab449b0d69ddea7 100644
--- a/pkg/analyzer/lib/src/generated/source.dart
+++ b/pkg/analyzer/lib/src/generated/source.dart
@@ -292,6 +292,14 @@ class LineInfo {
}
return lineStarts[lineNumber];
}
+
+ /**
+ * Return the offset of the first character on the line following the line
+ * containing the given [offset].
+ */
+ int getOffsetOfLineAfter(int offset) {
+ return getOffsetOfLine(getLocation(offset).lineNumber + 1);
+ }
}
/**

Powered by Google App Engine
This is Rietveld 408576698