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

Unified Diff: compiler/java/com/google/dart/compiler/parser/CommentPreservingParser.java

Issue 9598002: Use ASTVisitor as in new AST. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 10 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: compiler/java/com/google/dart/compiler/parser/CommentPreservingParser.java
diff --git a/compiler/java/com/google/dart/compiler/parser/CommentPreservingParser.java b/compiler/java/com/google/dart/compiler/parser/CommentPreservingParser.java
index 8142f7dd157b7c65fa023100dd391054211858fa..8729d083e6b587215cafbc904c1a3c13a72bbe44 100644
--- a/compiler/java/com/google/dart/compiler/parser/CommentPreservingParser.java
+++ b/compiler/java/com/google/dart/compiler/parser/CommentPreservingParser.java
@@ -10,7 +10,7 @@ import com.google.dart.compiler.Source;
import com.google.dart.compiler.ast.DartComment;
import com.google.dart.compiler.ast.DartDeclaration;
import com.google.dart.compiler.ast.DartNode;
-import com.google.dart.compiler.ast.DartNodeTraverser;
+import com.google.dart.compiler.ast.ASTVisitor;
import com.google.dart.compiler.ast.DartUnit;
import com.google.dart.compiler.metrics.CompilerMetrics;
import com.google.dart.compiler.util.DartSourceString;
@@ -149,7 +149,7 @@ public class CommentPreservingParser extends DartParser {
private void assignDartComments(DartUnit unit, List<DartComment> comments) {
// Collect the AST nodes in a list.
final List<DartNode> astNodes = new ArrayList<DartNode>();
- unit.accept(new DartNodeTraverser<DartNode>() {
+ unit.accept(new ASTVisitor<DartNode>() {
@Override
public DartNode visitDeclaration(DartDeclaration<?> node) {
astNodes.add(node);
@@ -208,7 +208,7 @@ public class CommentPreservingParser extends DartParser {
private List<DartNode> getChildren(DartNode parent) {
final List<DartNode> children = new ArrayList<DartNode>();
- parent.visitChildren(new DartNodeTraverser<DartNode>() {
+ parent.visitChildren(new ASTVisitor<DartNode>() {
@Override
public DartNode visitNode(DartNode node) {
children.add(node);

Powered by Google App Engine
This is Rietveld 408576698