001//
002// Generated by JTB 1.3.2
003//
004
005package jtb.syntaxtree;
006
007// Grammar production:
008// f0 -> "throw"
009// f1 -> Expression()
010// f2 -> ";"
011public class ThrowStatement implements Node {
012   // This was added after running jtb to remove serializable warning.
013   static final long serialVersionUID = 20150406L;
014
015   private Node parent;
016   public NodeToken f0;
017   public Expression f1;
018   public NodeToken f2;
019
020   public ThrowStatement(NodeToken n0, Expression n1, NodeToken n2) {
021      f0 = n0;
022      if ( f0 != null ) f0.setParent(this);
023      f1 = n1;
024      if ( f1 != null ) f1.setParent(this);
025      f2 = n2;
026      if ( f2 != null ) f2.setParent(this);
027   }
028
029   public ThrowStatement(Expression n0) {
030      f0 = new NodeToken("throw");
031      if ( f0 != null ) f0.setParent(this);
032      f1 = n0;
033      if ( f1 != null ) f1.setParent(this);
034      f2 = new NodeToken(";");
035      if ( f2 != null ) f2.setParent(this);
036   }
037
038   public void accept(jtb.visitor.Visitor v) {
039      v.visit(this);
040   }
041   public <R,A> R accept(jtb.visitor.GJVisitor<R,A> v, A argu) {
042      return v.visit(this,argu);
043   }
044   public <R> R accept(jtb.visitor.GJNoArguVisitor<R> v) {
045      return v.visit(this);
046   }
047   public <A> void accept(jtb.visitor.GJVoidVisitor<A> v, A argu) {
048      v.visit(this,argu);
049   }
050   public void setParent(Node n) { parent = n; }
051   public Node getParent()       { return parent; }
052}
053