]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EApply.java
Merged changes from feature/scl to master.
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / expressions / EApply.java
index 8df327362560bc8574eefc96542d9e6f4da4de4a..1de0944ebd3d0dc80d9f66d285b4a4c02949f2bc 100755 (executable)
@@ -37,8 +37,8 @@ import gnu.trove.set.hash.THashSet;
 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
@@ -397,4 +397,19 @@ public class EApply extends Expression {
     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