Examples of asWithKeywordParameters()


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

  private IValue traverseADTOnce(IValue subject, CaseBlockList casesOrRules,
      DIRECTION direction, PROGRESS progress, FIXEDPOINT fixedpoint, TraverseResult tr) {
    IConstructor cons = (IConstructor)subject;
   
    Map<String, IValue> kwParams = null;
    if (cons.mayHaveKeywordParameters() && cons.asWithKeywordParameters().hasParameters()) {
      kwParams = new HashMap<>();
    }
    if (cons.arity() == 0 && kwParams == null) {
      return subject; // constants have no children to traverse into
    }
View Full Code Here

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

        args[i] = traverseOnce(child, casesOrRules, direction, progress, fixedpoint, tr);
        hasChanged |= tr.changed;
        hasMatched |= tr.matched;
      }
      if (kwParams != null) {
        IWithKeywordParameters<? extends INode> consKw = cons.asWithKeywordParameters();
        for (String kwName : consKw.getParameterNames()) {
          IValue val = consKw.getParameter(kwName);
          tr.changed = false;
          tr.matched = false;
          IValue newVal = traverseOnce(val, casesOrRules, direction, progress, fixedpoint, tr);
View Full Code Here

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

              node.getKeywordParameterType(label))) {
            throw new UnexpectedType(node.getKeywordParameterType(label),
                __eval.__getValue().getType(), this);
          }

          __eval.__setValue(__eval.newResult(cons.asWithKeywordParameters().getParameter(label), __eval.__getValue()));

          IValue result = cons.asWithKeywordParameters().setParameter(label,  __eval.__getValue().getValue());
          return __eval.recur(this,
              org.rascalmpl.interpreter.result.ResultFactory
              .makeResult(receiver.getType(), result, __eval
View Full Code Here

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

                __eval.__getValue().getType(), this);
          }

          __eval.__setValue(__eval.newResult(cons.asWithKeywordParameters().getParameter(label), __eval.__getValue()));

          IValue result = cons.asWithKeywordParameters().setParameter(label,  __eval.__getValue().getValue());
          return __eval.recur(this,
              org.rascalmpl.interpreter.result.ResultFactory
              .makeResult(receiver.getType(), result, __eval
                  .__getEval()));
        }
View Full Code Here

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

              .noSuchField(label, this, __eval.getStackTrace());
        }

        if (node.hasKeywordParameter(label)) {
          return ResultFactory
              .makeResult(node.getKeywordParameterType(label), cons.asWithKeywordParameters().getParameter(label)
                  ,__eval);
        }
        else {
          int index = node.getFieldIndex(label);
          return ResultFactory
View Full Code Here

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

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

        // 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

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

   
    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

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

    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

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

      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
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.