OLD | NEW |
---|---|
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 /// Dart classes representing the souce spans and source files. | 5 /// Dart classes representing the souce spans and source files. |
6 library source_maps.span; | 6 library source_maps.span; |
7 | 7 |
8 import 'dart:math' show min, max; | 8 import 'dart:math' show min, max; |
9 | 9 |
10 import 'package:path/path.dart' as p; | 10 import 'package:path/path.dart' as p; |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
380 if (span == null) return message; | 380 if (span == null) return message; |
381 return "Error on " + span.getLocationMessage(message, | 381 return "Error on " + span.getLocationMessage(message, |
382 useColors: useColors, color: color); | 382 useColors: useColors, color: color); |
383 } | 383 } |
384 } | 384 } |
385 | 385 |
386 /// A [SpanException] that's also a [FormatException]. | 386 /// A [SpanException] that's also a [FormatException]. |
387 class SpanFormatException extends SpanException implements FormatException { | 387 class SpanFormatException extends SpanException implements FormatException { |
388 SpanFormatException(String message, Span span) | 388 SpanFormatException(String message, Span span) |
389 : super(message, span); | 389 : super(message, span); |
390 | |
391 get source => null; | |
nweiz
2014/07/14 19:24:15
This should be "span == null ? null : span.sourceU
nweiz
2014/07/14 19:35:51
I just looked at the source of FormatException and
Lasse Reichstein Nielsen
2014/07/15 09:19:48
Done. I have added the field, with an optional con
| |
392 int get position => null; | |
nweiz
2014/07/14 19:24:15
This should be "span == null ? null : span.start.o
Lasse Reichstein Nielsen
2014/07/15 09:19:48
Done.
| |
390 } | 393 } |
OLD | NEW |