]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EConstant.java
(refs #7375) Replace collectRefs by CollectRefsVisitor
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / expressions / EConstant.java
index 037144a4c63d20f15157410640c1e1a313ddea8d..4a2e07f431cd9410889c2275980aaf70819dc55f 100644 (file)
@@ -35,7 +35,7 @@ import gnu.trove.set.hash.THashSet;
 import gnu.trove.set.hash.TIntHashSet;
 
 public class EConstant extends Expression {
-    SCLValue value;
+    public SCLValue value;
     Type[] typeParameters;
     
     public EConstant(SCLValue value, Type ... typeParameters) {
@@ -83,23 +83,17 @@ public class EConstant extends Expression {
         return this;
     }
 
-       public void collectRefs(TObjectIntHashMap<Object> allRefs, TIntHashSet refs) {
-        int id = allRefs.get(value);
-        if(id >= 0)
-            refs.add(id);
+    @Override
+    public void collectVars(TObjectIntHashMap<Variable> allVars,
+            TIntHashSet vars) {   
     }
-       
-       @Override
-       public void collectVars(TObjectIntHashMap<Variable> allVars,
-               TIntHashSet vars) {   
-       }
 
-       public void toString(StringBuilder b, TypeUnparsingContext tuc) {
-           Name name = value.getName();
-           if(name.module.equals("Builtin") || name.module.equals("Prelude"))
-               b.append(name.name);
-           else
-               b.append(name);
+    public void toString(StringBuilder b, TypeUnparsingContext tuc) {
+        Name name = value.getName();
+        if(name.module.equals("Builtin") || name.module.equals("Prelude"))
+            b.append(name.name);
+        else
+            b.append(name);
         /*for(Type type : typeParameters) {
             b.append(" <");
             b.append(type.toString(tuc));