Package org.rascalmpl.interpreter

Examples of org.rascalmpl.interpreter.TypeReifier


  public final Type Exception_StaticError = tf.constructor(store, Exception, "StaticError", tf.stringType(), "messages", tf.sourceLocationType(), "location");
     
  public Eval(IValueFactory values){
    super();
    this.values = values;
    this.tr = new TypeReifier(values);
    duration = values.integer(1000*100); // default duration for eval
  }
View Full Code Here


  private Environment old = null;
  private ModuleEnvironment env = null;

  public HTMLGenerator(IValueFactory vf) {
    this.values = vf;
    this.tr = new TypeReifier(values);
    this.eval = new org.rascalmpl.library.util.Eval(values);
  }
View Full Code Here

    this(ValueFactoryFactory.getValueFactory());
  }
 
  public Manager(IValueFactory vf) {
    this.vf = vf;
    this.typeReifier = new TypeReifier(vf);
    this.registry = PDBValueTaskRegistry.getRegistry();
  }
View Full Code Here

      if (!declarations.getType().isSubtypeOf(defType)) {
        throw new UnexpectedType(defType, declarations.getType(), getSymbol());
      }
     
      java.util.Map<Type,Type> bindings = new HashMap<Type,Type>();
      bindings.put(Factory.TypeParam, new TypeReifier(VF).symbolToType((IConstructor) symbol.getValue(), (IMap) declarations.getValue()));
     
      IValue val = VF.constructor(Factory.Type_Reified.instantiate(bindings), symbol.getValue(), declarations.getValue());
     
      bindings.put(Factory.TypeParam, TF.valueType());
      Type typ = Factory.Type.instantiate(bindings);
View Full Code Here

    public Result<IValue> interpret(IEvaluator<Result<IValue>> eval) {
      eval.setCurrentAST(this);
      eval.notifyAboutSuspension(this);     

      Type t = getType().typeOf(eval.getCurrentEnvt(), false, eval);
      return new TypeReifier(eval.__getVf()).typeToValue(t, eval);
    }
View Full Code Here

  public Prelude(IValueFactory values){
    super();
   
    this.values = values;
    this.types = TypeFactory.getInstance();
    this.tr = new TypeReifier(values);
    random = new Random();
  }
View Full Code Here

  private static final TypeFactory tf = TypeFactory.getInstance();
 
  public RascalYAML(IValueFactory values) {
    super();
    this.values = values;
    this.reifier = new TypeReifier(values);
  }
View Full Code Here

 
  public IValue typeToValue(Type t, RascalExecutionContext rex) {
   
    TypeStore store = new TypeStore();
    IMap definitions = rex.getSymbolDefinitions();
    TypeReifier tr = new TypeReifier(vf);
    tr.declareAbstractDataTypes(definitions, store);
   
    IConstructor symbol = typeToSymbol(t, store);
   
    Map<Type,Type> bindings = new HashMap<Type,Type>();
    bindings.put(Factory.TypeParam, t);
View Full Code Here

  public IOCompiled(IValueFactory values){
    super(values);
   
    this.values = values;
    this.types2 = new Types(values);
    this.tr = new TypeReifier(values);
    separator = ',';
    header = true;
    this.pdbReader = new StandardTextReader();
  }
View Full Code Here

      throw RuntimeExceptionFactory.io(values.string(e.getMessage()), null, null);
    }
  }
  public IValue fromJSON(IValue type, IString src, IEvaluatorContext ctx) {
    TypeStore store = ctx.getCurrentEnvt().getStore();
    Type start = new TypeReifier(ctx.getValueFactory()).valueToType((IConstructor) type, store);
    Gson gson = new GsonBuilder()
    .enableComplexMapKeySerialization()
    .setDateFormat(DateFormat.LONG)
    .setFieldNamingPolicy(FieldNamingPolicy.UPPER_CAMEL_CASE)
    .setVersion(1.0)
View Full Code Here

TOP

Related Classes of org.rascalmpl.interpreter.TypeReifier

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.