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

Unified Diff: pkg/compiler/lib/src/tree/unparser.dart

Issue 1388523002: dart2js: add support for configuration-specific imports. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update and fix status files. Implement missing functions. Created 5 years 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/compiler/lib/src/tree/prettyprint.dart ('k') | tests/compiler/dart2js/unparser_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/tree/unparser.dart
diff --git a/pkg/compiler/lib/src/tree/unparser.dart b/pkg/compiler/lib/src/tree/unparser.dart
index 6f141fdf88eb4fec07ebf6111637976ece88190f..807ea0514b9ee1d1b0f32471662f24486ac2ffb2 100644
--- a/pkg/compiler/lib/src/tree/unparser.dart
+++ b/pkg/compiler/lib/src/tree/unparser.dart
@@ -782,9 +782,33 @@ class Unparser extends Indentation implements Visitor {
newline();
}
+ visitConditionalUri(ConditionalUri node) {
+ write(node.ifToken.value);
+ space();
+ write('(');
+ visit(node.key);
+ if (node.value != null) {
+ space();
+ write("==");
+ space();
+ visit(node.value);
+ }
+ write(")");
+ space();
+ visit(node.uri);
+ }
+
+ visitDottedName(DottedName node) {
+ unparseNodeListOfIdentifiers(node.identifiers);
+ }
+
visitImport(Import node) {
addToken(node.importKeyword);
visit(node.uri);
+ if (node.hasConditionalUris) {
+ write(' ');
+ visitNodeList(node.conditionalUris);
+ }
if (node.isDeferred) {
write(' deferred');
}
@@ -803,6 +827,10 @@ class Unparser extends Indentation implements Visitor {
visitExport(Export node) {
addToken(node.exportKeyword);
visit(node.uri);
+ if (node.hasConditionalUris) {
+ write(' ');
+ visitNodeList(node.conditionalUris);
+ }
if (node.combinators != null) {
write(' ');
visit(node.combinators);
« no previous file with comments | « pkg/compiler/lib/src/tree/prettyprint.dart ('k') | tests/compiler/dart2js/unparser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698