ASTLetNode.java
01 package net.sourceforge.pmd.lang.ecmascript.ast;
02 
03 import org.mozilla.javascript.ast.LetNode;
04 
05 public class ASTLetNode extends AbstractEcmascriptNode<LetNode> {
06     public ASTLetNode(LetNode letNode) {
07   super(letNode);
08     }
09 
10     /**
11      * Accept the visitor.
12      */
13     public Object jjtAccept(EcmascriptParserVisitor visitor, Object data) {
14   return visitor.visit(this, data);
15     }
16 
17     public ASTVariableDeclaration getVariables() {
18   return (ASTVariableDeclarationjjtGetChild(0);
19     }
20 
21     public boolean hasBody() {
22   return node.getBody() != null;
23     }
24 
25     public EcmascriptNode getBody() {
26   if (hasBody()) {
27       return (EcmascriptNodejjtGetChild(jjtGetNumChildren() 1);
28   else {
29       return null;
30   }
31     }
32 }