Package org.rascalmpl.interpreter.asserts

Examples of org.rascalmpl.interpreter.asserts.ImplementationError


      }
      else {
        return javaException(clazz, msg != null ? msg : "", ast, trace);
      }
    } catch (IOException e1) {
      throw new ImplementationError("Could not create stack trace", e1);
    }
  }
View Full Code Here


    this.loc = loc;
    this.name = name;
    this.callerScope = callerScope;
    this.callerLocation = callerLocation;
    if (parent == this) {
      throw new ImplementationError("internal error: cyclic environment");
    }
  }
View Full Code Here

   */
  public void storeLocalVariable(String name, Result<IValue> value) {
    Map<String,Result<IValue>> env = getLocalVariableDefiningEnvironment(name);

    if (env == null) {
      throw new ImplementationError("storeVariable should always find a scope");
    }

    Result<IValue> old = env.get(name);

    if (old == null) {
View Full Code Here

    return src;
  }

  @Override
  public boolean equals(Object obj) {
    throw new ImplementationError("we should have implemented concrete hashCode/equals methods");
  }
View Full Code Here

    throw new NotYetImplemented(this);
  }

  @Override
  public int hashCode() {
    throw new ImplementationError("we should have implemented concrete hashCode/equals methods");
  }
View Full Code Here

   
    if (TreeAdapter.isAmb(tree)) {
      throw new Ambiguous(tree);
    }
   
    throw new ImplementationError("Parse of module returned invalid tree.");
  }
View Full Code Here

    }
    else if (TreeAdapter.isAmb(parseTree)) {
      throw new Ambiguous(parseTree);
    }
   
    throw new ImplementationError("This is not a " + sort +  ": " + parseTree);
  }
View Full Code Here

 
  public AbstractAST buildValue(IValue arg)  {
    IConstructor tree = (IConstructor) arg;
   
    if (TreeAdapter.isList(tree)) {
      throw new ImplementationError("buildValue should not be called on a list");
    }
   
    if (TreeAdapter.isAmb(tree)) {
      throw new Ambiguous(tree);
    }
View Full Code Here

      return cached;
    }
   
    String constructorName = TreeAdapter.getConstructorName(tree);
    if (constructorName == null) {
      throw new ImplementationError("All Rascal productions should have a constructor name: " + TreeAdapter.getProduction(tree));
    }
   
    String cons = capitalize(constructorName);
    String sort = sortName(tree);
   
    if (sort.length() == 0) {
      throw new ImplementationError("Could not retrieve sort name for " + tree);
    }
    sort = sort.equalsIgnoreCase("pattern") ? "Expression" : capitalize(sort);
   
    switch(sort){
    case "Mapping":
View Full Code Here

      return cached;
    }
    String sort = capitalize(sortName(tree));

    if (sort.length() == 0) {
      throw new ImplementationError("could not retrieve sort name for " + tree);
    }
    Object actuals[] = new Object[] { tree, new String(TreeAdapter.yield(tree)) };

    AbstractAST result = callMakerMethod(sort, "Lexical", tree.asAnnotatable().getAnnotations(), actuals, null);
    lexCache.putUnsafe(tree, result);
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.