View Javadoc

1   /**
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3    */
4   package net.sourceforge.pmd.lang.ecmascript.ast;
5   
6   import org.mozilla.javascript.ast.ConditionalExpression;
7   
8   public class ASTConditionalExpression extends AbstractEcmascriptNode<ConditionalExpression> {
9       public ASTConditionalExpression(ConditionalExpression conditionalExpression) {
10  	super(conditionalExpression);
11      }
12  
13      /**
14       * Accept the visitor.
15       */
16      @Override
17      public Object jjtAccept(EcmascriptParserVisitor visitor, Object data) {
18  	return visitor.visit(this, data);
19      }
20  
21      public EcmascriptNode getTestExpression() {
22  	return (EcmascriptNode) jjtGetChild(0);
23      }
24  
25      public EcmascriptNode getTrueExpression() {
26  	return (EcmascriptNode) jjtGetChild(1);
27      }
28  
29      public EcmascriptNode getFalseExpression() {
30  	return (EcmascriptNode) jjtGetChild(2);
31      }
32  }