Examples of UndeclaredVariable


Examples of org.rascalmpl.interpreter.staticErrors.UndeclaredVariable

     
      Name name = this.getName();
      Result<IValue> variable = __eval.getCurrentEnvt().getVariable(name);

      if (variable == null) {
        throw new UndeclaredVariable(
            org.rascalmpl.interpreter.utils.Names.name(name), name);
      }

      if (variable.getValue() == null) {
        throw new UninitializedVariable(
View Full Code Here

Examples of org.rascalmpl.interpreter.staticErrors.UndeclaredVariable

      Name name = this.getName();
      Result<IValue> variable = __eval.getCurrentEnvt().getVariable(name);

      if (variable == null) {
        throw new UndeclaredVariable(
            org.rascalmpl.interpreter.utils.Names.name(name), name);
      }

      if (variable.getValue() == null) {
        throw new UninitializedVariable(
View Full Code Here

Examples of org.rascalmpl.interpreter.staticErrors.UndeclaredVariable

     
      org.rascalmpl.ast.QualifiedName name = this.getQualifiedName();
      Result<IValue> variable = __eval.getCurrentEnvt().getVariable(name);

      if (variable == null) {
        throw new UndeclaredVariable(
            org.rascalmpl.interpreter.utils.Names.fullName(name),
            name);
      }

      if (variable.getValue() == null) {
View Full Code Here

Examples of org.rascalmpl.interpreter.staticErrors.UndeclaredVariable

    @Override
    public String getString(IEvaluatorContext env) {
      Result<IValue> variable = env.getCurrentEnvt().getVariable(name);
     
      if (variable == null) {
        throw new UndeclaredVariable(name, env.getCurrentAST());
      }
     
      IValue value = variable.getValue();
      if (value == null) {
        throw new UninitializedVariable(name, env.getCurrentAST());
View Full Code Here

Examples of org.rascalmpl.interpreter.staticErrors.UndeclaredVariable

  @Override
  public Result<IValue> interpret(IEvaluator<Result<IValue>> eval) {
    Result<IValue> variable = eval.getCurrentEnvt().getVariable(name);

    if (variable == null) {
      throw new UndeclaredVariable(name, this);
    }

    if (variable.getValue() == null) {
      throw new UninitializedVariable(name, this);
    }
View Full Code Here

Examples of org.rascalmpl.interpreter.staticErrors.UndeclaredVariable

      String label = org.rascalmpl.interpreter.utils.Names.name(this
          .getField());

      if (receiver == null || receiver.getValue() == null) {
        // TODO: can this ever happen?
        throw new UndeclaredVariable(label, this.getReceiver());
      }

      Type receiverType = receiver.getType();
      if (receiverType.isTuple()) {
        // the run-time tuple may not have labels, the static type can
View Full Code Here

Examples of org.rascalmpl.interpreter.staticErrors.UndeclaredVariable

          QualifiedName var = varList.get(i);
          vars[i] = var;
          Result<IValue> tmp = __eval.getCurrentEnvt().getSimpleVariable(var);
         
          if (tmp == null) {
            throw new UndeclaredVariable(Names.fullName(var), var);
          }
          if (tmp.getValue() == null) {
            throw new UninitializedVariable(Names.fullName(var),
                var);
          }
View Full Code Here

Examples of org.rascalmpl.interpreter.staticErrors.UndeclaredVariable

     
      Name name = Names.toName(function, modEnv.getLocation());
      OverloadedFunction func = (OverloadedFunction) getCurrentEnvt().getVariable(name);
     
      if (func == null) {
        throw new UndeclaredVariable(function, name);
      }
     
      AbstractFunction main = func.getFunctions().get(0);
     
      if (func.getFunctions().size() > 1) {
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.