@Test(expected = IndexOutOfBoundsException.class) public void getChildBad() { pe.getChild(1); }
@Override public Expr getChild(int index) { if (index == 0) { return expr; } throw new IndexOutOfBoundsException("Index for ParenExpr must be 0"); }
ParenExpr extends Expr { @Override public Expr getChild(int index) { if (index == 0) { return expr; } throw new IndexOutOfBoundsException("Index for ParenExpr must be 0"); } }
ParenExpr extends Expr { @Override public Expr getChild(int index) { if (index == 0) { return expr; } throw new IndexOutOfBoundsException("Index for ParenExpr must be 0"); } ParenExpr(Expr expr); }
ParenExpr extends Expr { @Override public Expr getChild(int index) { if (index == 0) { return expr; } throw new IndexOutOfBoundsException("Index for ParenExpr must be 0"); } ParenExpr(Expr expr); Expr getExpr(); @Override void accept(IAstVisitor visitor); @Override ParenExpr clone(); @Override boolean hasChild(IAstNode candidateChild); @Override Expr getChild(int index); @Override void setChild(int index, Expr expr); @Override int getNumChildren(); }
ParenExpr extends Expr { @Override public Expr getChild(int index) { if (index == 0) { return expr; } throw new IndexOutOfBoundsException("Index for ParenExpr must be 0"); } ParenExpr(Expr expr); Expr getExpr(); @Override void accept(IAstVisitor visitor); @Override ParenExpr clone(); @Override boolean hasChild(IAstNode candidateChild); @Override Expr getChild(int index); @Override void setChild(int index, Expr expr); @Override int getNumChildren();  }