//
// Generated by JTB 1.2.1
//

package jde.parser.syntaxtree;

/**
 * Grammar production:
 * <PRE>
 * nodeToken -> "throw"
 * expression -> Expression()
 * nodeToken1 -> ";"
 * </PRE>
 */
public class ThrowStatement implements Node {
   private Node parent;
   public NodeToken nodeToken;
   public Expression expression;
   public NodeToken nodeToken1;

   public ThrowStatement(NodeToken n0, Expression n1, NodeToken n2) {
      nodeToken = n0;
      if ( nodeToken != null ) nodeToken.setParent(this);
      expression = n1;
      if ( expression != null ) expression.setParent(this);
      nodeToken1 = n2;
      if ( nodeToken1 != null ) nodeToken1.setParent(this);
   }

   public ThrowStatement(Expression n0) {
      nodeToken = new NodeToken("throw");
      if ( nodeToken != null ) nodeToken.setParent(this);
      expression = n0;
      if ( expression != null ) expression.setParent(this);
      nodeToken1 = new NodeToken(";");
      if ( nodeToken1 != null ) nodeToken1.setParent(this);
   }

   public void accept(jde.parser.visitor.Visitor v) {
      v.visit(this);
   }
   public Object accept(jde.parser.visitor.ObjectVisitor v, Object argu) {
      return v.visit(this,argu);
   }
   public void setParent(Node n) { parent = n; }
   public Node getParent()       { return parent; }
}

