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

Unified Diff: sdk/lib/_internal/compiler/implementation/tree/unparser.dart

Issue 476583003: Allow dart2dart to output one file per library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Insert library-names in generateds libraries. Fix bug of previous upload Created 6 years, 4 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/compiler/implementation/tree/unparser.dart
diff --git a/sdk/lib/_internal/compiler/implementation/tree/unparser.dart b/sdk/lib/_internal/compiler/implementation/tree/unparser.dart
index ce0b60eea650579556b9dc6aea7c829b60ce8449..b085d49c53f2c98b5f3e4cc8e93ec0db0278f3c2 100644
--- a/sdk/lib/_internal/compiler/implementation/tree/unparser.dart
+++ b/sdk/lib/_internal/compiler/implementation/tree/unparser.dart
@@ -641,9 +641,19 @@ class Unparser extends Indentation implements Visitor {
indentLess();
}
- unparseImportTag(String uri, [String prefix]) {
- final suffix = prefix == null ? '' : ' as $prefix';
- write('import "$uri"$suffix;');
+ unparseImportTag(String uri, {String prefix,
+ List<String> shows: const <String>[],
+ bool isDeferred: false}) {
+ String deferredString = isDeferred ? ' deferred' : '';
+ String prefixString = prefix == null ? '' : ' as $prefix';
+ String showString = shows.isEmpty ? '' : ' show ${shows.join(", ")}';
+ write('import "$uri"$deferredString$prefixString$showString;');
+ newline();
+ }
+
+ unparseExportTag(String uri, {List<String> shows: const []}) {
+ String suffix = shows.isEmpty ? '' : ' show ${shows.join(", ")}';
+ write('export "$uri"$suffix;');
newline();
}

Powered by Google App Engine
This is Rietveld 408576698