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

Unified Diff: pkg/observe/lib/transformer.dart

Issue 421503004: Switch transformers over to 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/code_transformers/pubspec.yaml ('k') | pkg/observe/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/observe/lib/transformer.dart
diff --git a/pkg/observe/lib/transformer.dart b/pkg/observe/lib/transformer.dart
index 672db0b1bee8dae3fc7620e1b4031b81d09ee0df..21b08fe0e14805957b636b5f896c302cdde729bc 100644
--- a/pkg/observe/lib/transformer.dart
+++ b/pkg/observe/lib/transformer.dart
@@ -15,7 +15,7 @@ import 'package:analyzer/src/generated/parser.dart';
import 'package:analyzer/src/generated/scanner.dart';
import 'package:barback/barback.dart';
import 'package:source_maps/refactor.dart';
-import 'package:source_maps/span.dart' show SourceFile;
+import 'package:source_span/source_span.dart';
/// A [Transformer] that replaces observables based on dirty-checking with an
/// implementation based on change notifications.
@@ -65,7 +65,7 @@ class ObservableTransformer extends Transformer {
// TODO(sigmund): improve how we compute this url
var url = id.path.startsWith('lib/')
? 'package:${id.package}/${id.path.substring(4)}' : id.path;
- var sourceFile = new SourceFile.text(url, content);
+ var sourceFile = new SourceFile(content, url: url);
var transaction = _transformCompilationUnit(
content, sourceFile, transform.logger);
if (!transaction.hasEdits) {
« no previous file with comments | « pkg/code_transformers/pubspec.yaml ('k') | pkg/observe/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698