Package org.eclipse.imp.pdb.facts

Examples of org.eclipse.imp.pdb.facts.INode.asWithKeywordParameters()


        System.err.println("JSonReader result:" + result);
    }
    if (annoMap != null)
      result = result.asAnnotatable().setAnnotations(map);
    if(kwmap.size() > 0){
      result = result.asWithKeywordParameters().setParameters(kwmap);
    }
    return result;
  }

  private IValue buildTerm(IValue t, Type type) {
View Full Code Here


        // bail out
        return new LessThanOrEqualResult(false, true, ctx);
      }
    }
   
    if (!left.asWithKeywordParameters().hasParameters() && right.asWithKeywordParameters().hasParameters()) {
      return new LessThanOrEqualResult(true, false, ctx);
    }

    if (left.asWithKeywordParameters().hasParameters() && !right.asWithKeywordParameters().hasParameters()) {
      return new LessThanOrEqualResult(false, false, ctx);
View Full Code Here

   
    if (!left.asWithKeywordParameters().hasParameters() && right.asWithKeywordParameters().hasParameters()) {
      return new LessThanOrEqualResult(true, false, ctx);
    }

    if (left.asWithKeywordParameters().hasParameters() && !right.asWithKeywordParameters().hasParameters()) {
      return new LessThanOrEqualResult(false, false, ctx);
    }
   
    if (left.asWithKeywordParameters().hasParameters() && right.asWithKeywordParameters().hasParameters()) {
      Map<String, IValue> paramsLeft = left.asWithKeywordParameters().getParameters();
View Full Code Here

    if (left.asWithKeywordParameters().hasParameters() && !right.asWithKeywordParameters().hasParameters()) {
      return new LessThanOrEqualResult(false, false, ctx);
    }
   
    if (left.asWithKeywordParameters().hasParameters() && right.asWithKeywordParameters().hasParameters()) {
      Map<String, IValue> paramsLeft = left.asWithKeywordParameters().getParameters();
      Map<String, IValue> paramsRight = right.asWithKeywordParameters().getParameters();
      if (paramsLeft.size() < paramsRight.size()) {
        return new LessThanOrEqualResult(true, false, ctx);
      }
View Full Code Here

      return new LessThanOrEqualResult(false, false, ctx);
    }
   
    if (left.asWithKeywordParameters().hasParameters() && right.asWithKeywordParameters().hasParameters()) {
      Map<String, IValue> paramsLeft = left.asWithKeywordParameters().getParameters();
      Map<String, IValue> paramsRight = right.asWithKeywordParameters().getParameters();
      if (paramsLeft.size() < paramsRight.size()) {
        return new LessThanOrEqualResult(true, false, ctx);
      }
      if (paramsLeft.size() > paramsRight.size()) {
        return new LessThanOrEqualResult(false, false, ctx);
View Full Code Here

  private IValue traverseNodeOnce(IValue subject, CaseBlockList casesOrRules,
      DIRECTION direction, PROGRESS progress, FIXEDPOINT fixedpoint, TraverseResult tr) {
    IValue result;
    INode node = (INode)subject;
    if (node.arity() == 0 && !(node.mayHaveKeywordParameters() && node.asWithKeywordParameters().hasParameters()) ){
      result = subject;
    }
    else {
      IValue args[] = new IValue[node.arity()];
      Map<String, IValue> kwParams = null;
View Full Code Here

      result = subject;
    }
    else {
      IValue args[] = new IValue[node.arity()];
      Map<String, IValue> kwParams = null;
      if (node.mayHaveKeywordParameters() && node.asWithKeywordParameters().hasParameters()) {
        kwParams = new HashMap<>();
      }
      boolean hasChanged = false;
      boolean hasMatched = false;
     
View Full Code Here

        args[i] = traverseOnce(child, casesOrRules, direction, progress, fixedpoint, tr);
        hasChanged |= tr.changed;
        hasMatched |= tr.matched;
      }
      if (kwParams != null) {
        IWithKeywordParameters<? extends INode> nodeKw = node.asWithKeywordParameters();
        for (String kwName : nodeKw.getParameterNames()) {
          IValue val = nodeKw.getParameter(kwName);
          tr.changed = false;
          tr.matched = false;
          IValue newVal = traverseOnce(val, casesOrRules, direction, progress, fixedpoint, tr);
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.