//
// Generated by JTB 1.2.1
//

package jde.parser.syntaxtree;

/**
 * Grammar production:
 * <PRE>
 * variableDeclaratorId -> VariableDeclaratorId()
 * nodeOptional -> [ "=" VariableInitializer() ]
 * </PRE>
 */
public class VariableDeclarator implements Node {
   private Node parent;
   public VariableDeclaratorId variableDeclaratorId;
   public NodeOptional nodeOptional;

   public VariableDeclarator(VariableDeclaratorId n0, NodeOptional n1) {
      variableDeclaratorId = n0;
      if ( variableDeclaratorId != null ) variableDeclaratorId.setParent(this);
      nodeOptional = n1;
      if ( nodeOptional != null ) nodeOptional.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; }
}

