]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ELiteral.java
Merge "(refs #7375) Replaced collectEffects by CollectEffectsVisitor"
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / expressions / ELiteral.java
index b11c0d66746ffd328d095cc0ae763de7fbc701d9..388fbb37a1f426c1e435f77b9f12ba03a224cf84 100644 (file)
@@ -11,11 +11,9 @@ import org.simantics.scl.compiler.elaboration.contexts.TypingContext;
 import org.simantics.scl.compiler.errors.Locations;
 import org.simantics.scl.compiler.internal.codegen.references.IVal;
 import org.simantics.scl.compiler.internal.codegen.writer.CodeWriter;
-import org.simantics.scl.compiler.internal.elaboration.utils.ExpressionDecorator;
 import org.simantics.scl.compiler.internal.interpreted.IConstant;
 import org.simantics.scl.compiler.internal.interpreted.IExpression;
 import org.simantics.scl.compiler.top.ExpressionInterpretationContext;
-import org.simantics.scl.compiler.types.Type;
 import org.simantics.scl.compiler.types.exceptions.MatchException;
 import org.simantics.scl.compiler.types.util.TypeUnparsingContext;
 
@@ -40,25 +38,22 @@ public class ELiteral extends Expression {
         return value;
     }
 
-       public void collectRefs(TObjectIntHashMap<Object> allRefs, TIntHashSet refs) {
+    @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) {
+    public void toString(StringBuilder b, TypeUnparsingContext tuc) {
         b.append(value);
     }
-       
-       @Override
-       protected void updateType() throws MatchException {
-           setType(value.getType());       
-       }
 
-       @Override
-       public IVal toVal(CompilationContext context, CodeWriter w) {
+    @Override
+    protected void updateType() throws MatchException {
+        setType(value.getType());          
+    }
+
+    @Override
+    public IVal toVal(CompilationContext context, CodeWriter w) {
         return value;
     }
 
@@ -105,15 +100,6 @@ public class ELiteral extends Expression {
     public Expression inferType(TypingContext context) {
         return this;
     }
-
-    @Override
-    public Expression decorate(ExpressionDecorator decorator) {
-        return decorator.decorate(this);
-    }
-
-    @Override
-    public void collectEffects(THashSet<Type> effects) {
-    }
     
     @Override
     public void setLocationDeep(long loc) {
@@ -125,10 +111,6 @@ public class ELiteral extends Expression {
     public void accept(ExpressionVisitor visitor) {
         visitor.visit(this);
     }
-
-    @Override
-    public void forVariables(VariableProcedure procedure) {
-    }
     
     @Override
     public boolean isPattern(int arity) {