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

Side by Side Diff: pkg/analyzer/lib/src/generated/source.dart

Issue 2147223003: Fix a small bug in the stress test (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 | « pkg/analysis_server/test/stress/replay/replay.dart ('k') | no next file » | 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 258
259 return new LineInfo_Location(min + 1, offset - _lineStarts[min] + 1); 259 return new LineInfo_Location(min + 1, offset - _lineStarts[min] + 1);
260 } 260 }
261 261
262 /** 262 /**
263 * Return the offset of the first character on the line with the given 263 * Return the offset of the first character on the line with the given
264 * [lineNumber]. 264 * [lineNumber].
265 */ 265 */
266 int getOffsetOfLine(int lineNumber) { 266 int getOffsetOfLine(int lineNumber) {
267 if (lineNumber < 0 || lineNumber >= lineCount) { 267 if (lineNumber < 0 || lineNumber >= lineCount) {
268 throw new ArgumentError('Invalid line number: $lineNumber'); 268 throw new ArgumentError(
269 'Invalid line number: $lineNumber; must be between 0 and ${lineCount - 1}');
269 } 270 }
270 return _lineStarts[lineNumber]; 271 return _lineStarts[lineNumber];
271 } 272 }
272 } 273 }
273 274
274 /** 275 /**
275 * Instances of the class `Location` represent the location of a character as a line and 276 * Instances of the class `Location` represent the location of a character as a line and
276 * column pair. 277 * column pair.
277 */ 278 */
278 class LineInfo_Location { 279 class LineInfo_Location {
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 Source resolveAbsolute(Uri uri, [Uri actualUri]); 934 Source resolveAbsolute(Uri uri, [Uri actualUri]);
934 935
935 /** 936 /**
936 * Return an absolute URI that represents the given [source], or `null` if a 937 * Return an absolute URI that represents the given [source], or `null` if a
937 * valid URI cannot be computed. 938 * valid URI cannot be computed.
938 * 939 *
939 * The computation should be based solely on [source.fullName]. 940 * The computation should be based solely on [source.fullName].
940 */ 941 */
941 Uri restoreAbsolute(Source source) => null; 942 Uri restoreAbsolute(Source source) => null;
942 } 943 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/stress/replay/replay.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698