Package org.rascalmpl.interpreter.asserts

Examples of org.rascalmpl.interpreter.asserts.ImplementationError


    }
   
    Command stat = new ASTBuilder().buildCommand(tree);
   
    if (stat == null) {
      throw new ImplementationError("Disambiguation failed: it removed all alternatives");
    }

    return eval(stat);
  }
View Full Code Here


    }

    Commands stat = new ASTBuilder().buildCommands(tree);
   
    if (stat == null) {
      throw new ImplementationError("Disambiguation failed: it removed all alternatives");
    }

    return eval(stat);
  }
View Full Code Here

  // Modules -------------------------------------------------------------
  @Override 
  public ModuleEnvironment getCurrentModuleEnvironment() {
    if (!(currentEnvt instanceof ModuleEnvironment)) {
      throw new ImplementationError("Current env should be a module environment");
    }
    return ((ModuleEnvironment) currentEnvt);
  }
View Full Code Here

        }
        else if (externalType instanceof FunctionType) {
          return visitFunctionType((FunctionType) externalType);
        }
       
        throw new ImplementationError("unable to reify " + externalType);
      }

      private IValue visitFunctionType(FunctionType externalType) {
        IListWriter w = vf.listWriter();
        for (Type arg : externalType.getArgumentTypes()) {
View Full Code Here

      else {
        type = Opt.Exist;
      }
    }
    else {
      throw new ImplementationError("optional with more than one element???", x.getLocation());
    }
  }
View Full Code Here

  }
 
  @Override
  public boolean next(){
    checkInitialized();
    throw new ImplementationError("AbstractPatternMap.match not implemented");
  }
View Full Code Here

    return firstCall;
  }

  public IValue next() {
    if(!firstCall){
      throw new ImplementationError("next called more than once");
    }
    firstCall = false;
    return value;
  }
View Full Code Here

        if (repl.getType().isString()){
          int start;
          int end;
          IBooleanResult lastPattern = e.getMatchPattern();
          if (lastPattern == null) {
            throw new ImplementationError("No last pattern known");
          }
          if (lastPattern instanceof RegExpPatternValue){
            start = ((RegExpPatternValue)lastPattern).getStart();
            end = ((RegExpPatternValue)lastPattern).getEnd();
          }
View Full Code Here

    else if(operator.isIntersection())
      this.__setOperator(AssignmentOperator.Intersection);
    else if(operator.isIfDefined())
      this.__setOperator(AssignmentOperator.IsDefined);
    else
        throw new ImplementationError("Unknown assignment operator");
    this.__setValue(value);
    this.env = env;
    this.eval = eval;
  }
View Full Code Here

      case Intersection:
        newValue = oldValue.intersect(rhsValue); break;
      case IsDefined:
        return oldValue;
      default:
        throw new ImplementationError("Unknown assignment operator");
      }
   
      if (newValue.getType().isSubtypeOf(oldValue.getType())) {
        newValue = org.rascalmpl.interpreter.result.ResultFactory.makeResult(oldValue.getType(), newValue.getValue(),this.__getEval());
        return newValue;
View Full Code Here

TOP

Related Classes of org.rascalmpl.interpreter.asserts.ImplementationError

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.