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

Unified Diff: sdk/lib/_internal/pub/lib/src/barback/transformer_id.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
Index: sdk/lib/_internal/pub/lib/src/barback/transformer_id.dart
diff --git a/sdk/lib/_internal/pub/lib/src/barback/transformer_id.dart b/sdk/lib/_internal/pub/lib/src/barback/transformer_id.dart
index e793ef3247b316e2c825189bb8b6b20433c8d4da..5d111ab034f1cea0f6e8ceb030bc6efb6bd93a6b 100644
--- a/sdk/lib/_internal/pub/lib/src/barback/transformer_id.dart
+++ b/sdk/lib/_internal/pub/lib/src/barback/transformer_id.dart
@@ -8,7 +8,7 @@ import 'dart:async';
import 'package:barback/barback.dart';
import 'package:path/path.dart' as p;
-import 'package:source_maps/source_maps.dart';
+import 'package:source_span/source_span.dart';
import '../io.dart';
import '../utils.dart';
@@ -35,7 +35,7 @@ class TransformerId {
final String path;
/// The source span from which this id was parsed.
- final Span span;
+ final SourceSpan span;
/// Whether this ID points to a built-in transformer exposed by pub.
bool get isBuiltInTransformer => package.startsWith('\$');
@@ -47,7 +47,7 @@ class TransformerId {
/// it just has a package name, it expands to lib/transformer.dart if that
/// exists, or lib/${package}.dart otherwise. Otherwise, it expands to
/// lib/${path}.dart. In either case it's located in the given package.
- factory TransformerId.parse(String identifier, Span span) {
+ factory TransformerId.parse(String identifier, SourceSpan span) {
if (identifier.isEmpty) {
throw new FormatException('Invalid library identifier: "".');
}
@@ -63,8 +63,8 @@ class TransformerId {
TransformerId(this.package, this.path, this.span) {
if (!package.startsWith('\$')) return;
if (_BUILT_IN_TRANSFORMERS.contains(package)) return;
- throw new SpanFormatException('Unsupported built-in transformer $package.',
- span);
+ throw new SourceSpanFormatException(
+ 'Unsupported built-in transformer $package.', span);
}
bool operator==(other) =>

Powered by Google App Engine
This is Rietveld 408576698