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

Side by Side Diff: lib/src/span.dart

Issue 1583453004: Get rid of all the library tags. (Closed) Base URL: git@github.com:dart-lang/source_span@master
Patch Set: 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 | « lib/src/location_mixin.dart ('k') | lib/src/span_exception.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 source_span.span;
6
7 import 'location.dart'; 5 import 'location.dart';
8 import 'span_mixin.dart'; 6 import 'span_mixin.dart';
9 7
10 /// A class that describes a segment of source text. 8 /// A class that describes a segment of source text.
11 abstract class SourceSpan implements Comparable<SourceSpan> { 9 abstract class SourceSpan implements Comparable<SourceSpan> {
12 /// The start location of this span. 10 /// The start location of this span.
13 final SourceLocation start; 11 final SourceLocation start;
14 12
15 /// The end location of this span, exclusive. 13 /// The end location of this span, exclusive.
16 final SourceLocation end; 14 final SourceLocation end;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 throw new ArgumentError("Source URLs \"${start.sourceUrl}\" and " 67 throw new ArgumentError("Source URLs \"${start.sourceUrl}\" and "
70 " \"${end.sourceUrl}\" don't match."); 68 " \"${end.sourceUrl}\" don't match.");
71 } else if (end.offset < start.offset) { 69 } else if (end.offset < start.offset) {
72 throw new ArgumentError('End $end must come after start $start.'); 70 throw new ArgumentError('End $end must come after start $start.');
73 } else if (text.length != start.distance(end)) { 71 } else if (text.length != start.distance(end)) {
74 throw new ArgumentError('Text "$text" must be ${start.distance(end)} ' 72 throw new ArgumentError('Text "$text" must be ${start.distance(end)} '
75 'characters long.'); 73 'characters long.');
76 } 74 }
77 } 75 }
78 } 76 }
OLDNEW
« no previous file with comments | « lib/src/location_mixin.dart ('k') | lib/src/span_exception.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698