Package org.rascalmpl.interpreter.env

Examples of org.rascalmpl.interpreter.env.Environment$NameFlags


      // TODO: what if the caller provides more arguments then are declared? They are
      // silently lost here.
  }
 
  public Map<String, IValue> computeKeywordArgs(IValue[] oldActuals, Map<String, IValue> keyArgValues) {
    Environment env = new Environment(declarationEnvironment, vf.sourceLocation(URIUtil.rootScheme("initializer")), "keyword parameter initializer");
    Environment old = ctx.getCurrentEnvt();
    Type formals = getFunctionType().getArgumentTypes();
   
    try {
      // we set up an environment to hold the positional parameter values
      ctx.setCurrentEnvt(env);
View Full Code Here


   *         function.
   */
  @Override
  public IValue call(IRascalMonitor monitor, String module, String name, IValue... args) {
    IRascalMonitor old = setMonitor(monitor);
    Environment oldEnv = getCurrentEnvt();
   
    try {
      ModuleEnvironment modEnv = getHeap().getModule(module);
      setCurrentEnvt(modEnv);
      return call(name, (Map<String,IValue>) null, args);
View Full Code Here

   * several strings in a row that do not start with '-' or '--' will be composed into a list or
   * a set depending on the type of the respective keyword parameter.
   */
  public IValue main(IRascalMonitor monitor, String module, String function, String[] commandline) {
    IRascalMonitor old = setMonitor(monitor);
    Environment oldEnv = getCurrentEnvt();
   
    try {
      ModuleEnvironment modEnv = getHeap().getModule(module);
      setCurrentEnvt(modEnv);
     
View Full Code Here

  }
 
  @Override
  public IValue call(String name, String module, Map<String, IValue> kwArgs, IValue... args) {
    IRascalMonitor old = setMonitor(monitor);
    Environment oldEnv = getCurrentEnvt();
   
    try {
      ModuleEnvironment modEnv = getHeap().getModule(module);
      setCurrentEnvt(modEnv);
      return call(name, kwArgs, args);
View Full Code Here

  }

  @Override 
  public StackTrace getStackTrace() {
    StackTrace trace = new StackTrace();
    Environment env = currentEnvt;
    while (env != null) {
      trace.add(env.getLocation(), env.getName());
      env = env.getCallerScope();
    }
    return trace.freeze();
  }
View Full Code Here

    setCurrentEnvt(old);
  }

  @Override 
  public void pushEnv() {
    Environment env = new Environment(getCurrentEnvt(), getCurrentLocation(), getCurrentEnvt().getName());
    setCurrentEnvt(env);
  }
View Full Code Here

    return currentAST != null ? currentAST.getLocation() : getCurrentEnvt().getLocation();
  }
 
  @Override 
  public void pushEnv(String name) {
    Environment env = new Environment(getCurrentEnvt(), getCurrentLocation(), name);
    setCurrentEnvt(env);
  }
View Full Code Here

  }

  @Override 
  public Environment pushEnv(Statement s) {
    /* use the same name as the current envt */
    Environment env = new Environment(getCurrentEnvt(), s.getLocation(), getCurrentEnvt().getName());
    setCurrentEnvt(env);
    return env;
  }
View Full Code Here

    return config;
  }
 
  public Stack<Environment> getCallStack() {
    Stack<Environment> stack = new Stack<Environment>();
    Environment env = currentEnvt;
    while (env != null) {
      stack.add(0, env);
      env = env.getCallerScope();
    }
    return stack;
  }
View Full Code Here

      __eval.notifyAboutSuspension(this);
     
      org.rascalmpl.ast.Statement body = this.getBody();
      org.rascalmpl.ast.Expression generator = this.getCondition();
      IBooleanResult gen;
      Environment old = __eval.getCurrentEnvt();
      String label = null;
      if (!this.getLabel().isEmpty()) {
        label = org.rascalmpl.interpreter.utils.Names.name(this
            .getLabel().getName());
      }
View Full Code Here

TOP

Related Classes of org.rascalmpl.interpreter.env.Environment$NameFlags

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.