OLD | NEW |
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.file; | |
6 | |
7 import 'dart:math' as math; | 5 import 'dart:math' as math; |
8 import 'dart:typed_data'; | 6 import 'dart:typed_data'; |
9 | 7 |
10 import 'location.dart'; | 8 import 'location.dart'; |
11 import 'location_mixin.dart'; | 9 import 'location_mixin.dart'; |
12 import 'span.dart'; | 10 import 'span.dart'; |
13 import 'span_mixin.dart'; | 11 import 'span_mixin.dart'; |
14 import 'span_with_context.dart'; | 12 import 'span_with_context.dart'; |
15 | 13 |
16 // Constants to determine end-of-lines. | 14 // Constants to determine end-of-lines. |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 var start = math.min(this._start, other._start); | 347 var start = math.min(this._start, other._start); |
350 var end = math.max(this._end, other._end); | 348 var end = math.max(this._end, other._end); |
351 return new _FileSpan(file, start, end); | 349 return new _FileSpan(file, start, end); |
352 } else { | 350 } else { |
353 var start = math.min(this._start, other.start.offset); | 351 var start = math.min(this._start, other.start.offset); |
354 var end = math.max(this._end, other.end.offset); | 352 var end = math.max(this._end, other.end.offset); |
355 return new _FileSpan(file, start, end); | 353 return new _FileSpan(file, start, end); |
356 } | 354 } |
357 } | 355 } |
358 } | 356 } |
OLD | NEW |