Chromium Code Reviews

Side by Side Diff: lib/src/location_mixin.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.
Jump to:
View unified diff |
« no previous file with comments | « lib/src/location.dart ('k') | lib/src/span.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.location_mixin;
6
7 import 'location.dart'; 5 import 'location.dart';
8 import 'span.dart'; 6 import 'span.dart';
9 7
10 // Note: this class duplicates a lot of functionality of [SourceLocation]. This 8 // Note: this class duplicates a lot of functionality of [SourceLocation]. This
11 // is because in order for SourceLocation to use SourceLocationMixin, 9 // is because in order for SourceLocation to use SourceLocationMixin,
12 // SourceLocationMixin couldn't implement SourceLocation. In SourceSpan we 10 // SourceLocationMixin couldn't implement SourceLocation. In SourceSpan we
13 // handle this by making the class itself non-extensible, but that would be a 11 // handle this by making the class itself non-extensible, but that would be a
14 // breaking change for SourceLocation. So until we want to endure the pain of 12 // breaking change for SourceLocation. So until we want to endure the pain of
15 // cutting a release with breaking changes, we duplicate the code here. 13 // cutting a release with breaking changes, we duplicate the code here.
16 14
(...skipping 25 matching lines...)
42 bool operator ==(other) => 40 bool operator ==(other) =>
43 other is SourceLocation && 41 other is SourceLocation &&
44 sourceUrl == other.sourceUrl && 42 sourceUrl == other.sourceUrl &&
45 offset == other.offset; 43 offset == other.offset;
46 44
47 int get hashCode => sourceUrl.hashCode + offset; 45 int get hashCode => sourceUrl.hashCode + offset;
48 46
49 String toString() => '<$runtimeType: $offset $toolString>'; 47 String toString() => '<$runtimeType: $offset $toolString>';
50 } 48 }
51 49
OLDNEW
« no previous file with comments | « lib/src/location.dart ('k') | lib/src/span.dart » ('j') | no next file with comments »

Powered by Google App Engine