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

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

Issue 1622313003: Add minimal yaml support to the engine (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address Comments Created 4 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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/plugin/engine_plugin.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0fae83a01853d234957ecf8969010ff3314a0e34..a3662f98300382935fef0fb52266cf72806c1db8 100644
--- a/pkg/analyzer/lib/src/generated/source.dart
+++ b/pkg/analyzer/lib/src/generated/source.dart
@@ -200,6 +200,13 @@ class LineInfo {
factory LineInfo(List<int> _lineStarts) => new LineInfoWithCount(_lineStarts);
/**
+ * Initialize a newly created set of line information corresponding to the
+ * given file [content].
+ */
+ factory LineInfo.fromContent(String content) =>
+ new LineInfoWithCount(StringUtilities.computeLineStarts(content));
+
+ /**
* Initialize a newly created set of line information to represent the data
* encoded in the given list of [_lineStarts].
*/
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/plugin/engine_plugin.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698