Example #1
0
 public void visitForceChildren(final TreeVisitor visitor) {
   if (visitor.reverse()) {
     expr.visit(visitor);
   } else {
     expr.visit(visitor);
   }
 }
Example #2
0
  /**
   * Constructor.
   *
   * @param size Expression representing the size of the array.
   * @param elementType The type of the elements in the array.
   * @param type The type of this expression.
   */
  public NewArrayExpr(final Expr size, final Type elementType, final Type type) {
    super(type);
    this.size = size;
    this.elementType = elementType;

    size.setParent(this);
  }
Example #3
0
 public int exprHashCode() {
   return 9 + expr.exprHashCode() ^ type.simple().hashCode();
 }
Example #4
0
 /**
  * Constructor.
  *
  * @param expr An expression that is to be checked.
  * @param type The type of this expression.
  */
 public CheckExpr(final Expr expr, final Type type) {
   super(type);
   this.expr = expr;
   expr.setParent(this);
 }
Example #5
0
 public Object clone() {
   return copyInto(new NewArrayExpr((Expr) size.clone(), elementType, type));
 }
Example #6
0
 public int exprHashCode() {
   return 15 + size.exprHashCode();
 }
Example #7
0
 public Object clone() {
   return copyInto(new NegExpr((Expr) expr.clone(), type));
 }
Example #8
0
 public int exprHashCode() {
   return 14 + expr.exprHashCode();
 }