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

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

Issue 11033003: Unparse new library syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 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 | « dart/lib/compiler/implementation/tree/nodes.dart ('k') | dart/tests/compiler/dart2js/parser_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/lib/compiler/implementation/tree/unparser.dart
diff --git a/dart/lib/compiler/implementation/tree/unparser.dart b/dart/lib/compiler/implementation/tree/unparser.dart
index f13b36b8233e5fe70b0a587e53be78d0e9c311af..a1d0fad161293cc63ed5aa3fc20af1c23fbcb288 100644
--- a/dart/lib/compiler/implementation/tree/unparser.dart
+++ b/dart/lib/compiler/implementation/tree/unparser.dart
@@ -515,4 +515,46 @@ class Unparser implements Visitor {
visit(node.formals);
add(node.endToken.value);
}
+
+ visitLibraryName(LibraryName node) {
+ addToken(node.libraryKeyword);
+ node.visitChildren(this);
+ add(node.getEndToken().value);
+ }
+
+ visitImport(Import node) {
+ addToken(node.importKeyword);
+ visit(node.uri);
+ if (node.prefix != null) {
+ sb.add(' ');
+ addToken(node.asKeyword);
+ visit(node.prefix);
+ }
+ if (node.combinators != null) {
+ visit(node.combinators);
+ }
+ add(node.getEndToken().value);
+ }
+
+ visitExport(Export node) {
+ addToken(node.exportKeyword);
+ visit(node.uri);
+ if (node.combinators != null) {
+ visit(node.combinators);
+ }
+ add(node.getEndToken().value);
+ }
+
+ visitPart(Part node) {
+ addToken(node.partKeyword);
+ visit(node.uri);
+ add(node.getEndToken().value);
+ }
+
+ visitPartOf(PartOf node) {
+ addToken(node.partKeyword);
+ addToken(node.ofKeyword);
+ visit(node.name);
+ add(node.getEndToken().value);
+ }
}
« no previous file with comments | « dart/lib/compiler/implementation/tree/nodes.dart ('k') | dart/tests/compiler/dart2js/parser_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698