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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/plugin/engine_plugin.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.src.generated.source; 5 library analyzer.src.generated.source;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import "dart:math" as math; 8 import "dart:math" as math;
9 9
10 import 'package:analyzer/file_system/file_system.dart'; 10 import 'package:analyzer/file_system/file_system.dart';
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 */ 193 */
194 int _previousLine = 0; 194 int _previousLine = 0;
195 195
196 /** 196 /**
197 * Initialize a newly created set of line information to represent the data 197 * Initialize a newly created set of line information to represent the data
198 * encoded in the given list of [_lineStarts]. 198 * encoded in the given list of [_lineStarts].
199 */ 199 */
200 factory LineInfo(List<int> _lineStarts) => new LineInfoWithCount(_lineStarts); 200 factory LineInfo(List<int> _lineStarts) => new LineInfoWithCount(_lineStarts);
201 201
202 /** 202 /**
203 * Initialize a newly created set of line information corresponding to the
204 * given file [content].
205 */
206 factory LineInfo.fromContent(String content) =>
207 new LineInfoWithCount(StringUtilities.computeLineStarts(content));
208
209 /**
203 * Initialize a newly created set of line information to represent the data 210 * Initialize a newly created set of line information to represent the data
204 * encoded in the given list of [_lineStarts]. 211 * encoded in the given list of [_lineStarts].
205 */ 212 */
206 LineInfo._(this._lineStarts) { 213 LineInfo._(this._lineStarts) {
207 if (_lineStarts == null) { 214 if (_lineStarts == null) {
208 throw new IllegalArgumentException("lineStarts must be non-null"); 215 throw new IllegalArgumentException("lineStarts must be non-null");
209 } else if (_lineStarts.length < 1) { 216 } else if (_lineStarts.length < 1) {
210 throw new IllegalArgumentException("lineStarts must be non-empty"); 217 throw new IllegalArgumentException("lineStarts must be non-empty");
211 } 218 }
212 } 219 }
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 Source resolveAbsolute(Uri uri, [Uri actualUri]); 1124 Source resolveAbsolute(Uri uri, [Uri actualUri]);
1118 1125
1119 /** 1126 /**
1120 * Return an absolute URI that represents the given [source], or `null` if a 1127 * Return an absolute URI that represents the given [source], or `null` if a
1121 * valid URI cannot be computed. 1128 * valid URI cannot be computed.
1122 * 1129 *
1123 * The computation should be based solely on [source.fullName]. 1130 * The computation should be based solely on [source.fullName].
1124 */ 1131 */
1125 Uri restoreAbsolute(Source source) => null; 1132 Uri restoreAbsolute(Source source) => null;
1126 } 1133 }
OLDNEW
« 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