From 7beb2824c18a245f8935ea6264b61bb117133dea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Sun, 26 Apr 2020 17:08:20 +0200 Subject: [PATCH] Cleanup ecmascript visitor --- .../lang/ecmascript/ast/EcmascriptNode.java | 8 + .../ast/EcmascriptParserVisitor.java | 204 +++++++++--- .../ast/EcmascriptParserVisitorAdapter.java | 250 -------------- .../rule/AbstractEcmascriptRule.java | 306 ------------------ 4 files changed, 162 insertions(+), 606 deletions(-) diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptNode.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptNode.java index b42a23672d..e8da9af25f 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptNode.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptNode.java @@ -7,6 +7,7 @@ package net.sourceforge.pmd.lang.ecmascript.ast; import org.mozilla.javascript.ast.AstNode; import net.sourceforge.pmd.lang.ast.Node; +import net.sourceforge.pmd.lang.ast.NodeStream; public interface EcmascriptNode extends Node { @@ -31,6 +32,13 @@ public interface EcmascriptNode extends Node { @Deprecated T getNode(); + + @Override + default NodeStream> children() { + return (NodeStream) Node.super.children(); + } + + /** * Get the JsDoc associated with the given node. If there is no JsDoc on * this node, it may be associated with a parent node, on more diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserVisitor.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserVisitor.java index 2b1abfc343..175c3a6789 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserVisitor.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserVisitor.java @@ -5,103 +5,207 @@ package net.sourceforge.pmd.lang.ecmascript.ast; public interface EcmascriptParserVisitor { - Object visit(EcmascriptNode node, Object data); - Object visit(ASTArrayComprehension node, Object data); + default Object visit(EcmascriptNode node, Object data) { + for (EcmascriptNode child : node.children()) { + child.jjtAccept(this, data); + } + return data; + } - Object visit(ASTArrayComprehensionLoop node, Object data); + default Object visit(ASTArrayComprehension node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTArrayLiteral node, Object data); + default Object visit(ASTArrayComprehensionLoop node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTAssignment node, Object data); + default Object visit(ASTArrayLiteral node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTAstRoot node, Object data); + default Object visit(ASTAssignment node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTBlock node, Object data); + default Object visit(ASTAstRoot node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTBreakStatement node, Object data); + default Object visit(ASTBlock node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTCatchClause node, Object data); + default Object visit(ASTBreakStatement node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTComment node, Object data); + default Object visit(ASTCatchClause node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTConditionalExpression node, Object data); + default Object visit(ASTComment node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTContinueStatement node, Object data); + default Object visit(ASTConditionalExpression node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTDoLoop node, Object data); + default Object visit(ASTContinueStatement node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTElementGet node, Object data); + default Object visit(ASTDoLoop node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTEmptyExpression node, Object data); + default Object visit(ASTElementGet node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTExpressionStatement node, Object data); + default Object visit(ASTEmptyExpression node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTForInLoop node, Object data); + default Object visit(ASTExpressionStatement node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTForLoop node, Object data); + default Object visit(ASTForInLoop node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTFunctionCall node, Object data); + default Object visit(ASTForLoop node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTFunctionNode node, Object data); + default Object visit(ASTFunctionCall node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTIfStatement node, Object data); + default Object visit(ASTFunctionNode node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTInfixExpression node, Object data); + default Object visit(ASTIfStatement node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTKeywordLiteral node, Object data); + default Object visit(ASTInfixExpression node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTLabel node, Object data); + default Object visit(ASTKeywordLiteral node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTLabeledStatement node, Object data); + default Object visit(ASTLabel node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTLetNode node, Object data); + default Object visit(ASTLabeledStatement node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTName node, Object data); + default Object visit(ASTLetNode node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTNewExpression node, Object data); + default Object visit(ASTName node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTNumberLiteral node, Object data); + default Object visit(ASTNewExpression node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTObjectLiteral node, Object data); + default Object visit(ASTNumberLiteral node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTObjectProperty node, Object data); + default Object visit(ASTObjectLiteral node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTParenthesizedExpression node, Object data); + default Object visit(ASTObjectProperty node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTPropertyGet node, Object data); + default Object visit(ASTParenthesizedExpression node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTRegExpLiteral node, Object data); + default Object visit(ASTPropertyGet node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTReturnStatement node, Object data); + default Object visit(ASTRegExpLiteral node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTScope node, Object data); + default Object visit(ASTReturnStatement node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTStringLiteral node, Object data); + default Object visit(ASTScope node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTSwitchCase node, Object data); + default Object visit(ASTStringLiteral node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTSwitchStatement node, Object data); + default Object visit(ASTSwitchCase node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTThrowStatement node, Object data); + default Object visit(ASTSwitchStatement node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTTryStatement node, Object data); + default Object visit(ASTThrowStatement node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTUnaryExpression node, Object data); + default Object visit(ASTTryStatement node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTVariableDeclaration node, Object data); + default Object visit(ASTUnaryExpression node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTVariableInitializer node, Object data); + default Object visit(ASTVariableDeclaration node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTWhileLoop node, Object data); + default Object visit(ASTVariableInitializer node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTWithStatement node, Object data); + default Object visit(ASTWhileLoop node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTXmlDotQuery node, Object data); + default Object visit(ASTWithStatement node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTXmlExpression node, Object data); + default Object visit(ASTXmlDotQuery node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTXmlMemberGet node, Object data); + default Object visit(ASTXmlExpression node, Object data) { + return visit((EcmascriptNode) node, data); + } - Object visit(ASTXmlString node, Object data); + default Object visit(ASTXmlMemberGet node, Object data) { + return visit((EcmascriptNode) node, data); + } + + default Object visit(ASTXmlString node, Object data) { + return visit((EcmascriptNode) node, data); + } } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserVisitorAdapter.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserVisitorAdapter.java index b8ee75de59..4b42dfc3ee 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserVisitorAdapter.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserVisitorAdapter.java @@ -6,254 +6,4 @@ package net.sourceforge.pmd.lang.ecmascript.ast; public class EcmascriptParserVisitorAdapter implements EcmascriptParserVisitor { - @Override - public Object visit(EcmascriptNode node, Object data) { - node.childrenAccept(this, data); - return null; - } - - @Override - public Object visit(ASTArrayComprehension node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTArrayComprehensionLoop node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTArrayLiteral node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTAssignment node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTAstRoot node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTBlock node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTBreakStatement node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTCatchClause node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTComment node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTConditionalExpression node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTContinueStatement node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTDoLoop node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTElementGet node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTEmptyExpression node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTExpressionStatement node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTForInLoop node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTForLoop node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTFunctionCall node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTFunctionNode node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTIfStatement node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTInfixExpression node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTKeywordLiteral node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTLabel node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTLabeledStatement node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTLetNode node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTName node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTNewExpression node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTNumberLiteral node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTObjectLiteral node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTObjectProperty node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTParenthesizedExpression node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTPropertyGet node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTRegExpLiteral node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTReturnStatement node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTScope node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTStringLiteral node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTSwitchCase node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTSwitchStatement node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTThrowStatement node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTTryStatement node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTUnaryExpression node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTVariableDeclaration node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTVariableInitializer node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTWhileLoop node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTWithStatement node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTXmlDotQuery node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTXmlExpression node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTXmlMemberGet node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTXmlString node, Object data) { - return visit((EcmascriptNode) node, data); - } } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/AbstractEcmascriptRule.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/AbstractEcmascriptRule.java index 61ab2aa106..954742a9b8 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/AbstractEcmascriptRule.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/AbstractEcmascriptRule.java @@ -13,56 +13,7 @@ import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge.pmd.lang.ecmascript.EcmascriptLanguageModule; import net.sourceforge.pmd.lang.ecmascript.EcmascriptParserOptions; import net.sourceforge.pmd.lang.ecmascript.EcmascriptParserOptions.Version; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTArrayComprehension; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTArrayComprehensionLoop; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTArrayLiteral; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTAssignment; import net.sourceforge.pmd.lang.ecmascript.ast.ASTAstRoot; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTBlock; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTBreakStatement; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTCatchClause; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTComment; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTConditionalExpression; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTContinueStatement; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTDoLoop; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTElementGet; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTEmptyExpression; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTExpressionStatement; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTForInLoop; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTForLoop; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTFunctionCall; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTFunctionNode; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTIfStatement; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTInfixExpression; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTKeywordLiteral; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTLabel; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTLabeledStatement; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTLetNode; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTName; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTNewExpression; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTNumberLiteral; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTObjectLiteral; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTObjectProperty; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTParenthesizedExpression; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTPropertyGet; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTRegExpLiteral; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTReturnStatement; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTScope; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTStringLiteral; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTSwitchCase; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTSwitchStatement; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTThrowStatement; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTTryStatement; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTUnaryExpression; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTVariableDeclaration; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTVariableInitializer; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTWhileLoop; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTWithStatement; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTXmlDotQuery; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTXmlExpression; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTXmlMemberGet; -import net.sourceforge.pmd.lang.ecmascript.ast.ASTXmlString; -import net.sourceforge.pmd.lang.ecmascript.ast.EcmascriptNode; import net.sourceforge.pmd.lang.ecmascript.ast.EcmascriptParserVisitor; import net.sourceforge.pmd.lang.rule.AbstractRule; import net.sourceforge.pmd.lang.rule.ImmutableLanguage; @@ -101,261 +52,4 @@ public abstract class AbstractEcmascriptRule extends AbstractRule } } - // - // The following APIs are identical to those in - // EcmascriptParserVisitorAdapter. - // Due to Java single inheritance, it preferred to extend from the more - // complex Rule base class instead of from relatively simple Visitor. - // - - @Override - public Object visit(EcmascriptNode node, Object data) { - node.childrenAccept(this, data); - return null; - } - - @Override - public Object visit(ASTArrayComprehension node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTArrayComprehensionLoop node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTArrayLiteral node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTAssignment node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTAstRoot node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTBlock node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTBreakStatement node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTCatchClause node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTComment node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTConditionalExpression node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTContinueStatement node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTDoLoop node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTElementGet node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTEmptyExpression node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTExpressionStatement node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTForInLoop node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTForLoop node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTFunctionCall node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTFunctionNode node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTIfStatement node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTInfixExpression node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTKeywordLiteral node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTLabel node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTLabeledStatement node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTLetNode node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTName node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTNewExpression node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTNumberLiteral node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTObjectLiteral node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTObjectProperty node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTParenthesizedExpression node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTPropertyGet node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTRegExpLiteral node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTReturnStatement node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTScope node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTStringLiteral node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTSwitchCase node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTSwitchStatement node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTThrowStatement node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTTryStatement node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTUnaryExpression node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTVariableDeclaration node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTVariableInitializer node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTWhileLoop node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTWithStatement node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTXmlDotQuery node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTXmlExpression node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTXmlMemberGet node, Object data) { - return visit((EcmascriptNode) node, data); - } - - @Override - public Object visit(ASTXmlString node, Object data) { - return visit((EcmascriptNode) node, data); - } }