import org.simantics.scl.compiler.types.Types;
import org.simantics.scl.compiler.types.exceptions.MatchException;
-import gnu.trove.map.hash.TObjectIntHashMap;
-import gnu.trove.set.hash.THashSet;
-import gnu.trove.set.hash.TIntHashSet;
-
public class ERealLiteral extends SimplifiableExpression {
public String value;
- EVariable constraint;
+ public EVariable constraint;
public ERealLiteral(String value) {
this.value = value;
}
- @Override
- public void collectRefs(TObjectIntHashMap<Object> allRefs,
- TIntHashSet refs) {
- }
-
- @Override
- public void collectVars(TObjectIntHashMap<Variable> allVars,
- TIntHashSet vars) {
- }
-
private Expression tryToConvertToPrimitive(ErrorLog errorLog, Type requiredType) {
if(requiredType.equals(Types.DOUBLE))
return new ELiteral(new DoubleConstant(Double.parseDouble(value)));
protected void updateType() throws MatchException {
throw new InternalCompilerError("TODO");
}
-
- @Override
- public void collectFreeVariables(THashSet<Variable> vars) {
- }
@Override
public Expression simplify(SimplificationContext context) {
copy.setType(getType().replace(context.tvarMap));
return copy;
}
-
- @Override
- public void collectEffects(THashSet<Type> effects) {
- }
@Override
public void setLocationDeep(long loc) {
public String getValue() {
return value;
}
-
- @Override
- public void forVariables(VariableProcedure procedure) {
- if(constraint != null)
- constraint.forVariables(procedure);
- }
@Override
public Expression accept(ExpressionTransformer transformer) {