Minor in JS: use acceptStatement where appropriate
This commit is contained in:
@@ -80,7 +80,7 @@ public class JsCatch extends SourceInfoAwareJsNode implements HasCondition {
|
||||
if (condition != null) {
|
||||
condition = v.accept(condition);
|
||||
}
|
||||
body = v.accept(body);
|
||||
body = v.acceptStatement(body);
|
||||
}
|
||||
v.endVisit(this, ctx);
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ public class JsFor extends SourceInfoAwareJsNode implements JsStatement {
|
||||
if (initExpression != null) {
|
||||
initExpression = v.accept(initExpression);
|
||||
} else if (initVars != null) {
|
||||
initVars = v.accept(initVars);
|
||||
initVars = v.acceptStatement(initVars);
|
||||
}
|
||||
|
||||
if (condition != null) {
|
||||
|
||||
@@ -85,7 +85,7 @@ public final class JsFunction extends JsLiteral implements HasName {
|
||||
public void traverse(JsVisitorWithContext v, JsContext ctx) {
|
||||
if (v.visit(this, ctx)) {
|
||||
v.acceptList(getParameters());
|
||||
body = v.accept(body);
|
||||
body = v.acceptStatement(body);
|
||||
}
|
||||
v.endVisit(this, ctx);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public class JsProgramFragment extends SourceInfoAwareJsNode {
|
||||
@Override
|
||||
public void traverse(JsVisitorWithContext v, JsContext ctx) {
|
||||
if (v.visit(this, ctx)) {
|
||||
v.accept(globalBlock);
|
||||
v.acceptStatement(globalBlock);
|
||||
}
|
||||
v.endVisit(this, ctx);
|
||||
}
|
||||
|
||||
@@ -74,10 +74,10 @@ public class JsTry extends SourceInfoAwareJsNode implements JsStatement {
|
||||
@Override
|
||||
public void traverse(JsVisitorWithContext v, JsContext ctx) {
|
||||
if (v.visit(this, ctx)) {
|
||||
tryBlock = v.accept(tryBlock);
|
||||
tryBlock = v.acceptStatement(tryBlock);
|
||||
v.acceptList(catches);
|
||||
if (finallyBlock != null) {
|
||||
finallyBlock = v.accept(finallyBlock);
|
||||
finallyBlock = v.acceptStatement(finallyBlock);
|
||||
}
|
||||
}
|
||||
v.endVisit(this, ctx);
|
||||
|
||||
Reference in New Issue
Block a user