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

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: 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..97e3aaed1f6ddacc60db94404b41841d8646e12d 100644
--- a/sdk/lib/_internal/compiler/implementation/tree/unparser.dart
+++ b/sdk/lib/_internal/compiler/implementation/tree/unparser.dart
@@ -641,12 +641,21 @@ class Unparser extends Indentation implements Visitor {
indentLess();
}
- unparseImportTag(String uri, [String prefix]) {
- final suffix = prefix == null ? '' : ' as $prefix';
+ unparseImportTag(String uri, {String prefix, List<String> shows: const [],
jgruber1 2014/08/15 06:20:53 Types on these and suffix? :)
sigurdm 2014/08/15 13:31:42 Done.
+ bool isDeferred: false}) {
+ final suffix = (isDeferred ? ' deferred' : '') +
Johnni Winther 2014/08/15 08:07:31 Use interpolation instead of the + operator on Str
sigurdm 2014/08/15 13:31:42 Done.
+ (prefix == null ? '' : ' as $prefix') +
+ (shows.isEmpty ? '' : ' show ${shows.join(", ")}');
write('import "$uri"$suffix;');
newline();
}
+ unparseExportTag(String uri, {List<String> shows: const []}) {
+ final suffix = shows.isEmpty ? '' : ' show ${shows.join(", ")}';
+ write('export "$uri"$suffix;');
+ newline();
+ }
+
visitTryStatement(TryStatement node) {
addToken(node.tryKeyword);
visit(node.tryBlock);

Powered by Google App Engine
This is Rietveld 408576698