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

Unified Diff: sdk/lib/_internal/pub/lib/src/barback/transformer_config.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_config.dart
diff --git a/sdk/lib/_internal/pub/lib/src/barback/transformer_config.dart b/sdk/lib/_internal/pub/lib/src/barback/transformer_config.dart
index 42ff5ba534f081f244d8b54d60bedbe56ad043ea..e6f9912ef96e197e6ca6605e0bdd45aaaa607918 100644
--- a/sdk/lib/_internal/pub/lib/src/barback/transformer_config.dart
+++ b/sdk/lib/_internal/pub/lib/src/barback/transformer_config.dart
@@ -5,7 +5,7 @@
library pub.barback.transformer_config;
import 'package:path/path.dart' as p;
-import 'package:source_maps/source_maps.dart';
+import 'package:source_span/source_span.dart';
import 'package:yaml/yaml.dart';
import 'transformer_id.dart';
@@ -27,7 +27,7 @@ class TransformerConfig {
final Map configuration;
/// The source span from which this configuration was parsed.
- final Span span;
+ final SourceSpan span;
/// The primary input inclusions.
///
@@ -65,7 +65,7 @@ class TransformerConfig {
/// Parses [identifier] as a [TransformerId] with [configuration].
///
/// [identifierSpan] is the source span for [identifier].
- factory TransformerConfig.parse(String identifier, Span identifierSpan,
+ factory TransformerConfig.parse(String identifier, SourceSpan identifierSpan,
YamlMap configuration) =>
new TransformerConfig(new TransformerId.parse(identifier, identifierSpan),
configuration);
@@ -81,13 +81,13 @@ class TransformerConfig {
if (field is List) {
for (var node in field.nodes) {
if (node.value is String) continue;
- throw new SpanFormatException(
+ throw new SourceSpanFormatException(
'"$key" field may contain only strings.', node.span);
}
return new Set.from(field);
} else {
- throw new SpanFormatException(
+ throw new SourceSpanFormatException(
'"$key" field must be a string or list.', fieldNode.span);
}
}
@@ -114,7 +114,7 @@ class TransformerConfig {
// All other keys starting with "$" are unexpected.
for (var key in configuration.keys) {
if (key is! String || !key.startsWith(r'$')) continue;
- throw new SpanFormatException(
+ throw new SourceSpanFormatException(
'Unknown reserved field.', configurationNode.nodes[key].span);
}
}
« no previous file with comments | « pkg/yaml/test/yaml_node_wrapper_test.dart ('k') | sdk/lib/_internal/pub/lib/src/barback/transformer_id.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698