X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Felaboration%2Fexpressions%2FEConstant.java;h=4a2e07f431cd9410889c2275980aaf70819dc55f;hp=c5b4681a86d233e4ee87fa8fe5b152ae6aa7baeb;hb=a9f88c57e622d9ecf2732bd0278e0989dc0dfd5a;hpb=747231cca0974ca9ed5f78caa6517ee9dcb8e4fc diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EConstant.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EConstant.java index c5b4681a8..4a2e07f43 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EConstant.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EConstant.java @@ -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 allRefs, TIntHashSet refs) { - int id = allRefs.get(value); - if(id >= 0) - refs.add(id); + @Override + public void collectVars(TObjectIntHashMap allVars, + TIntHashSet vars) { } - - @Override - public void collectVars(TObjectIntHashMap 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)); @@ -258,10 +252,6 @@ public class EConstant extends Expression { public Precedence getPrecedence() { return value.getPrecedence(); } - - @Override - public void forVariables(VariableProcedure procedure) { - } @Override public boolean isPattern(int arity) {