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

Unified Diff: pkg/string_scanner/lib/src/exception.dart

Issue 401753002: Move a number of packages and some of pub over to using source_span. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/string_scanner/CHANGELOG.md ('k') | pkg/string_scanner/lib/src/span_scanner.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/string_scanner/lib/src/exception.dart
diff --git a/pkg/string_scanner/lib/src/exception.dart b/pkg/string_scanner/lib/src/exception.dart
index 44ec9a3e715720b4e3d646e41330049eec8241f4..50177d657f6cb46acb5dd4ff0f0a5e1f90102ea9 100644
--- a/pkg/string_scanner/lib/src/exception.dart
+++ b/pkg/string_scanner/lib/src/exception.dart
@@ -4,18 +4,17 @@
library string_scanner.exception;
-import 'package:source_maps/source_maps.dart';
+import 'package:source_span/source_span.dart';
/// An exception thrown by a [StringScanner] that failed to parse a string.
-class StringScannerException extends SpanFormatException {
- /// The source string being parsed.
- final String string;
+class StringScannerException extends SourceSpanFormatException {
+ String get source => super.source;
/// The URL of the source file being parsed.
///
/// This may be `null`, indicating that the source URL is unknown.
- final Uri sourceUrl;
+ Uri get sourceUrl => span.sourceUrl;
- StringScannerException(String message, this.string, this.sourceUrl, Span span)
- : super(message, span);
+ StringScannerException(String message, SourceSpan span, String source)
+ : super(message, span, source);
}
« no previous file with comments | « pkg/string_scanner/CHANGELOG.md ('k') | pkg/string_scanner/lib/src/span_scanner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698