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.ContinueStatement;
7   
8   public class ASTContinueStatement extends AbstractEcmascriptNode<ContinueStatement> {
9       public ASTContinueStatement(ContinueStatement continueStatement) {
10  	super(continueStatement);
11  	super.setImage(continueStatement.getLabel() != null ? continueStatement.getLabel().getIdentifier() : null);
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 hasLabel() {
23  	return node.getLabel() != null;
24      }
25  
26      public ASTName getLabel() {
27  	return (ASTName) jjtGetChild(0);
28      }
29  }