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

Side by Side Diff: pkg/source_maps/lib/span.dart

Issue 396603003: Change "FormatException.position" to be named "offset". (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reapply change, with necessary fixes in span_execption.dart Created 6 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 | Annotate | Revision Log
« no previous file with comments | « pkg/source_maps/CHANGELOG.md ('k') | pkg/source_maps/pubspec.yaml » ('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) 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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 378
379 String toString({bool useColors: false, String color}) { 379 String toString({bool useColors: false, String color}) {
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 final source;
389
390 SpanFormatException(String message, Span span, [this.source])
389 : super(message, span); 391 : super(message, span);
390 392
391 get source => null; 393 int get offset => span == null ? null : span.start.offset;
392 int get position => null;
393 } 394 }
OLDNEW
« no previous file with comments | « pkg/source_maps/CHANGELOG.md ('k') | pkg/source_maps/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698