import gnu.trove.set.hash.TIntHashSet;\r
\r
public class EApply extends Expression {\r
- Expression function;\r
- Expression[] parameters;\r
+ public Expression function;\r
+ public Expression[] parameters;\r
Type effect = Types.NO_EFFECTS;\r
\r
public EApply(Expression function, Expression ... parameters) {\r
public Expression accept(ExpressionTransformer transformer) {\r
return transformer.transform(this);\r
}\r
+ \r
+ @Override\r
+ public boolean equalsExpression(Expression expression) {\r
+ if(expression.getClass() != getClass())\r
+ return false;\r
+ EApply other = (EApply)expression;\r
+ if(parameters.length != other.parameters.length)\r
+ return false;\r
+ if(!function.equalsExpression(other.function))\r
+ return false;\r
+ for(int i=0;i<parameters.length;++i)\r
+ if(!parameters[i].equalsExpression(other.parameters[i]))\r
+ return false;\r
+ return true;\r
+ }\r
}\r