Examples of GlobalEnvironment


Examples of org.rascalmpl.interpreter.env.GlobalEnvironment

      IConstructor top = TreeAdapter.getStartTop(tree);

      String name = Modules.getName(top);

      // create the current module if it does not exist yet
      GlobalEnvironment heap = eval.getHeap();
      ModuleEnvironment env = heap.getModule(name);
      if(env == null){
        env = new ModuleEnvironment(name, heap);
        // do not add the module to the heap here.
      }
      env.setBootstrap(needBootstrapParser(data));
View Full Code Here

Examples of org.rascalmpl.interpreter.env.GlobalEnvironment

    }

    @Override
    public Result<IValue> interpret(IEvaluator<Result<IValue>> eval) {
      String name = getModuleName(this);
      GlobalEnvironment heap = eval.__getHeap();
      ModuleEnvironment env = heap.getModule(name);

      if (env == null) {
        env = new ModuleEnvironment(name, heap);
        heap.addModule(env);
      }

      Environment oldEnv = eval.getCurrentEnvt();
      eval.setCurrentEnvt(env); // such that declarations end up in
      // the module scope
View Full Code Here

Examples of org.rascalmpl.interpreter.env.GlobalEnvironment

      Type adt;
      QualifiedName sort = this.getSort();
      String name = org.rascalmpl.interpreter.utils.Names.typeName(sort);

      if (org.rascalmpl.interpreter.utils.Names.isQualified(sort)) {
        GlobalEnvironment heap = env.getHeap();
        ModuleEnvironment mod = heap
            .getModule(org.rascalmpl.interpreter.utils.Names
                .moduleName(sort));

        if (mod == null) {
          throw new UndeclaredModule(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.