]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ELiteral.java
(refs #7375) Replaced collectVars method by a visitor
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / expressions / ELiteral.java
index 388fbb37a1f426c1e435f77b9f12ba03a224cf84..bef28f20ff298a75b65f594cf4bbea08446017d7 100644 (file)
@@ -1,6 +1,8 @@
 package org.simantics.scl.compiler.elaboration.expressions;
 
 import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Set;
 
 import org.simantics.scl.compiler.compilation.CompilationContext;
 import org.simantics.scl.compiler.constants.Constant;
@@ -17,10 +19,6 @@ import org.simantics.scl.compiler.top.ExpressionInterpretationContext;
 import org.simantics.scl.compiler.types.exceptions.MatchException;
 import org.simantics.scl.compiler.types.util.TypeUnparsingContext;
 
-import gnu.trove.map.hash.TObjectIntHashMap;
-import gnu.trove.set.hash.THashSet;
-import gnu.trove.set.hash.TIntHashSet;
-
 public class ELiteral extends Expression {
     Constant value;
     
@@ -37,10 +35,10 @@ public class ELiteral extends Expression {
     public Constant getValue() {
         return value;
     }
-
+    
     @Override
-    public void collectVars(TObjectIntHashMap<Variable> allVars,
-            TIntHashSet vars) {            
+    public Set<Variable> getFreeVariables() {
+        return Collections.emptySet();
     }
 
     public void toString(StringBuilder b, TypeUnparsingContext tuc) {
@@ -57,11 +55,6 @@ public class ELiteral extends Expression {
         return value;
     }
 
-    @Override
-    public void collectFreeVariables(THashSet<Variable> vars) {
-    }
-
-
     @Override
     public Expression simplify(SimplificationContext context) {
         return this;
@@ -87,10 +80,6 @@ public class ELiteral extends Expression {
         return new ELiteral(value);
     }
     
-    @Override
-    public void removeFreeVariables(THashSet<Variable> vars) {     
-    }
-    
     @Override
     public IExpression toIExpression(ExpressionInterpretationContext target) {
         return new IConstant(value.realizeValue(target.localClassBuilder));