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