Package org.rascalmpl.interpreter.staticErrors

Examples of org.rascalmpl.interpreter.staticErrors.UnsupportedOperation


          path = parent;
        }
        uriPartChanged = true;
      }
      else if (name.equals("ls")) {
        throw new UnsupportedOperation("can not update the children of a location", ctx.getCurrentAST());
      }
      else if (name.equals("extension")) {
        if (!replType.isString()) {
          throw new UnexpectedType(getTypeFactory().stringType(), replType, ctx.getCurrentAST());
        }
View Full Code Here


     
      if (onType.isAbstractData() || onType.isConstructor() || onType.isNode()) {
        __eval.getCurrentModuleEnvironment().declareAnnotation(onType,
            name, annoType);
      } else {
        throw new UnsupportedOperation("Can only declare annotations on node and ADT types",getOnType());
      }

      return org.rascalmpl.interpreter.result.ResultFactory.nothing();
    }
View Full Code Here

    return ResultFactory.bool(getValue().has(Names.name(name)), ctx);
  }
 
  @Override
  public Result<IValue> call(Type[] argTypes, IValue[] argValues, Map<String, IValue> keyArgValues) {
    throw new UnsupportedOperation("Can not call a constructed " + getType() + " node as a function", ctx.getCurrentAST());
  }
View Full Code Here

        Type type = arg.getType().typeOf(env, true, eval.getEvaluator());
        type = type.instantiate(env.getTypeBindings());
       
        // TODO: Question, should we allow non terminal types in splices?
        if (type instanceof NonTerminalType) {
          throw new UnsupportedOperation("splicing match", type, this);
//          throw new ImplementationError(null);
        }       
        return new TypedMultiVariablePattern(eval, this, type, arg.getName());
      }
      if(arg.hasQualifiedName()){
View Full Code Here

  }
 
  // Error aux methods
 
  protected <U extends IValue> Result<U> undefinedError(String operator) {
    throw new UnsupportedOperation(operator, getType(), ctx.getCurrentAST());
  }
View Full Code Here

  protected <U extends IValue> Result<U> undefinedError(String operator) {
    throw new UnsupportedOperation(operator, getType(), ctx.getCurrentAST());
  }
 
  protected <U extends IValue> Result<U> undefinedError(String operator, Result<?> arg) {
    throw new UnsupportedOperation(operator, getType(), arg.getType(), ctx.getCurrentAST());
  }
View Full Code Here

  }
 
  ///////
 
  public Result<IValue> call(Type[] argTypes, IValue[] argValues, Map<String, IValue> keyArgValues) throws MatchFailed {
    throw new UnsupportedOperation("A value of type " + getType() + " is not something you can call like a function, a constructor or a closure.", ctx.getCurrentAST());
  }
View Full Code Here

    public  <U extends IValue> Result<U> transitiveClosure() {
      if (getValue().asRelation().arity() == 0 || getValue().asRelation().arity() == 2) {
        try {
          return makeResult(type, getValue().asRelation().closure(), ctx);
        } catch (IllegalOperationException e){
          throw new UnsupportedOperation("Illegal argument of transitive closure (+)", ctx.getCurrentAST());
        }
      }
      throw new Arity(2, getValue().asRelation().arity(), ctx.getCurrentAST());
    }
View Full Code Here

    public  <U extends IValue> Result<U> transitiveReflexiveClosure() {
      if (getValue().asRelation().arity() == 0 || getValue().asRelation().arity() == 2) {
        try {
          return makeResult(type, getValue().asRelation().closureStar(), ctx);
        } catch (IllegalOperationException e){
          throw new UnsupportedOperation("Illegal argument of reflexive transitive closure (*)", ctx.getCurrentAST());
        }
      }
      throw new Arity(2, getValue().asRelation().arity(), ctx.getCurrentAST());
    }
View Full Code Here

        throw new UnexpectedType(keyType, subscript.getType(),
            this.getSubscript());
      }
      // TODO implement other subscripts
      throw new UnsupportedOperation("subscript",
          receiver.getType(), this);

    }
View Full Code Here

TOP

Related Classes of org.rascalmpl.interpreter.staticErrors.UnsupportedOperation

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.