Package kiss.lang

Examples of kiss.lang.Expression.substitute()


  public Expression substitute(IPersistentMap bindings) {
    int i=0;
    Expression nx=null;
    for (;i<length; i++) {
      Expression x=exps[i];
      nx=x.substitute(bindings);
      if (nx==null) return null;
      if (nx!=x) break;
    }
    if (i==length) return this; // no changes
    Expression[] nexps=exps.clone();
View Full Code Here


    if (i==length) return this; // no changes
    Expression[] nexps=exps.clone();
    nexps[i++]=nx;
    for (;i<length; i++) {
      Expression x=exps[i];
      nx=x.substitute(bindings);
      if (nx==null) return null;
      nexps[i]=nx;
    }
    return create(nexps);
  }
View Full Code Here

  public Expression substitute(IPersistentMap bindings) {
    int i=0;
    Expression nx=null;
    for (;i<length; i++) {
      Expression x=vals.get(i);
      nx=x.substitute(bindings);
      if (nx==null) return null;
      if (nx!=x) break;
    }
    if (i==length) return this; // no changes
    ArrayList<Expression> al=new ArrayList<Expression>();
View Full Code Here

      al.add(vals.get(j));
    }
    al.add(nx);
    for (;i<length; i++) {
      Expression x=vals.get(i);
      nx=x.substitute(bindings);
      if (nx==null) return null;
      al.add(nx);
    }
    return create(al);
  }
View Full Code Here

    int i=0;
    Expression nxv=null;
    Expression nxk=null;
    for (;i<length; i++) {
      Expression k=keys.get(i);
      nxk=k.substitute(bindings);
      Expression x=vals.get(i);
      nxv=x.substitute(bindings);
     
      if (nxk==null) return null;
      if (nxk!=k) break;
View Full Code Here

    Expression nxk=null;
    for (;i<length; i++) {
      Expression k=keys.get(i);
      nxk=k.substitute(bindings);
      Expression x=vals.get(i);
      nxv=x.substitute(bindings);
     
      if (nxk==null) return null;
      if (nxk!=k) break;
      if (nxv==null) return null;
      if (nxv!=x) break;     
View Full Code Here

    }
    alk.add(nxk);
    alv.add(nxv);
    for (;i<length; i++) {
      Expression k=keys.get(i);
      nxk=k.substitute(bindings);
      if (nxk==null) return null;
      alk.add(nxk);

      Expression x=vals.get(i);
      nxv=x.substitute(bindings);
View Full Code Here

      nxk=k.substitute(bindings);
      if (nxk==null) return null;
      alk.add(nxk);

      Expression x=vals.get(i);
      nxv=x.substitute(bindings);
      if (nxv==null) return null;
      alv.add(nxv);
    }
    return create(alk,alv);
  }
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.