Beispiel #1
0
 public void visitForceChildren(final TreeVisitor visitor) {
   if (visitor.reverse()) {
     expr.visit(visitor);
   } else {
     expr.visit(visitor);
   }
 }
  /**
   * 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);
  }
Beispiel #3
0
 public int exprHashCode() {
   return 9 + expr.exprHashCode() ^ type.simple().hashCode();
 }
Beispiel #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);
 }
 public Object clone() {
   return copyInto(new NewArrayExpr((Expr) size.clone(), elementType, type));
 }
 public int exprHashCode() {
   return 15 + size.exprHashCode();
 }
Beispiel #7
0
 public Object clone() {
   return copyInto(new NegExpr((Expr) expr.clone(), type));
 }
Beispiel #8
0
 public int exprHashCode() {
   return 14 + expr.exprHashCode();
 }