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.Token;
    7   import org.mozilla.javascript.ast.ExpressionStatement;
    8
    9   public class ASTExpressionStatement extends AbstractEcmascriptNode<ExpressionStatement> {
    10      public ASTExpressionStatement(ExpressionStatement expressionStatement) {
    11  	super(expressionStatement);
    12      }
    13
    14      /**
    15       * Accept the visitor.
    16       */
    17      @Override
    18      public Object jjtAccept(EcmascriptParserVisitor visitor, Object data) {
    19  	return visitor.visit(this, data);
    20      }
    21
    22      public boolean hasResult() {
    23  	return node.getType() == Token.EXPR_RESULT;
    24      }
    25  }