From 7d6a6dd1460525d6e679491be15a68d9ab3d596e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Sat, 27 Apr 2019 15:18:44 +0200 Subject: [PATCH] Fix some root nodes not being RootNode --- .../pmd/lang/ecmascript/ast/ASTAstRoot.java | 4 +++- pmd-vm/src/main/ant/alljavacc.xml | 1 + .../pmd/lang/vm/ast/ASTprocess.java | 24 +++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/ast/ASTprocess.java diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTAstRoot.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTAstRoot.java index 1da66dbed0..b4976f84e1 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTAstRoot.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTAstRoot.java @@ -6,7 +6,9 @@ package net.sourceforge.pmd.lang.ecmascript.ast; import org.mozilla.javascript.ast.AstRoot; -public class ASTAstRoot extends AbstractEcmascriptNode { +import net.sourceforge.pmd.lang.ast.RootNode; + +public class ASTAstRoot extends AbstractEcmascriptNode implements RootNode { public ASTAstRoot(AstRoot astRoot) { super(astRoot); } diff --git a/pmd-vm/src/main/ant/alljavacc.xml b/pmd-vm/src/main/ant/alljavacc.xml index 8f07d54ade..845e8da6f7 100644 --- a/pmd-vm/src/main/ant/alljavacc.xml +++ b/pmd-vm/src/main/ant/alljavacc.xml @@ -68,6 +68,7 @@ public class]]> + diff --git a/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/ast/ASTprocess.java b/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/ast/ASTprocess.java new file mode 100644 index 0000000000..326c074e31 --- /dev/null +++ b/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/ast/ASTprocess.java @@ -0,0 +1,24 @@ +/* + * BSD-style license; for more info see http://pmd.sourceforge.net/license.html + */ + +package net.sourceforge.pmd.lang.vm.ast; + +import net.sourceforge.pmd.lang.ast.RootNode; + +public final class ASTprocess extends AbstractVmNode implements RootNode { + + public ASTprocess(int id) { + super(id); + } + + public ASTprocess(VmParser p, int id) { + super(p, id); + } + + + @Override + public Object jjtAccept(VmParserVisitor visitor, Object data) { + return visitor.visit(this, data); + } +}