Index: pkg/kernel/lib/text/ast_to_text.dart |
diff --git a/pkg/kernel/lib/text/ast_to_text.dart b/pkg/kernel/lib/text/ast_to_text.dart |
index 12d012a1e07dd49b5862c54c99ac148c4f049dbd..1c5b71b4a885157c058dee83823e5ec3c403f5fd 100644 |
--- a/pkg/kernel/lib/text/ast_to_text.dart |
+++ b/pkg/kernel/lib/text/ast_to_text.dart |
@@ -283,7 +283,35 @@ class Printer extends Visitor<Null> { |
endLine('import "$importPath" as $prefix;'); |
} |
} |
+ |
// TODO(scheglov): Do we want to print dependencies? dartbug.com/30224 |
+ if (library.additionalExports.isNotEmpty) { |
+ write('additionalExports = ('); |
+ for (var reference in library.additionalExports) { |
+ var node = reference.node; |
+ if (node is Class) { |
+ Library nodeLibrary = node.enclosingLibrary; |
+ String prefix = syntheticNames.nameLibraryPrefix(nodeLibrary); |
+ write(prefix + '::' + node.name); |
+ } else if (node is Field) { |
+ Library nodeLibrary = node.enclosingLibrary; |
+ String prefix = syntheticNames.nameLibraryPrefix(nodeLibrary); |
+ write(prefix + '::' + node.name.name); |
+ } else if (node is Procedure) { |
+ Library nodeLibrary = node.enclosingLibrary; |
+ String prefix = syntheticNames.nameLibraryPrefix(nodeLibrary); |
+ write(prefix + '::' + node.name.name); |
+ } else if (node is Typedef) { |
+ Library nodeLibrary = node.enclosingLibrary; |
+ String prefix = syntheticNames.nameLibraryPrefix(nodeLibrary); |
+ write(prefix + '::' + node.name); |
+ } else { |
+ throw new UnimplementedError('${node.runtimeType}'); |
+ } |
+ } |
+ endLine(')'); |
+ } |
+ |
endLine(); |
var inner = new Printer._inner(this, imports); |
library.typedefs.forEach(inner.writeNode); |