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

Unified Diff: compiler/java/com/google/dart/compiler/ast/DartToSourceVisitor.java

Issue 8948001: Updates dartc to recognize 'default' keyword on interface and updated factory method syntax (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Feedback from mmendez Created 9 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
Index: compiler/java/com/google/dart/compiler/ast/DartToSourceVisitor.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartToSourceVisitor.java b/compiler/java/com/google/dart/compiler/ast/DartToSourceVisitor.java
index 4d57671507ded42ba580a2e6cf7c339e9f771a21..a9f5b5b9f44c7e8048154fd89904c5fbb5336fee 100644
--- a/compiler/java/com/google/dart/compiler/ast/DartToSourceVisitor.java
+++ b/compiler/java/com/google/dart/compiler/ast/DartToSourceVisitor.java
@@ -26,7 +26,7 @@ public class DartToSourceVisitor extends DartVisitor {
private final boolean isDiet;
private final boolean calculateHash;
-
+
public DartToSourceVisitor(TextOutput out) {
this(out, false);
}
@@ -36,13 +36,13 @@ public class DartToSourceVisitor extends DartVisitor {
this.isDiet = isDiet;
this.calculateHash = false;
}
-
+
public DartToSourceVisitor(TextOutput out, boolean isDiet, boolean calculateHash) {
this.out = out;
this.isDiet = isDiet;
this.calculateHash = calculateHash;
}
-
+
public void generateSourceMap(boolean generate) {
this.buildMappings = generate;
}
@@ -136,7 +136,7 @@ public class DartToSourceVisitor extends DartVisitor {
if (calculateHash == true) {
start = out.getPosition();
}
-
+
if (x.isInterface()) {
p("interface ");
} else {
@@ -902,11 +902,13 @@ public class DartToSourceVisitor extends DartVisitor {
}
@Override
- public boolean visit(DartParameterizedNode x, DartContext ctx) {
+ public boolean visit(DartParameterizedTypeNode x, DartContext ctx) {
accept(x.getExpression());
- p("<");
- printSeparatedByComma(x.getTypeParameters());
- p(">");
+ if (!x.getTypeParameters().isEmpty()) {
+ p("<");
+ printSeparatedByComma(x.getTypeParameters());
+ p(">");
+ }
return false;
}

Powered by Google App Engine
This is Rietveld 408576698