Package erjang

Examples of erjang.ESeq.cons()


    }
   
    res = res.cons(fun.info(ERT.am_module));
   
    if (is_local) {
      res = res.cons(fun.info(ERT.am_pid));
    }
   
    return res;
  }
 
View Full Code Here


  }

  public ESeq makeList() {
    ESeq res = ERT.NIL;
    for (int i = varnames.length-1; i >= 0; i--) {
      res = res.cons(vars.get(varnames[i]));
    }
    return res;
  }

  public EObject makeTuple() {
View Full Code Here

  public static ESeq decode_options(byte[] ops, int i) {
    ESeq l = ERT.NIL;
    for (; i < ops.length; i++) {
      switch(ops[i]) {
      case 'g': l = l.cons(EAtom.intern("global")); break;
      case 'u': l = l.cons(EAtom.intern("unicode")); break;
      case 'i': l = l.cons(EAtom.intern("caseless")); break;
      case 'f': l = l.cons(EAtom.intern("firstline")); break;
      case 'm': l = l.cons(EAtom.intern("multiline")); break;
      case 's': l = l.cons(EAtom.intern("dotall")); break;
View Full Code Here

  public static ESeq decode_options(byte[] ops, int i) {
    ESeq l = ERT.NIL;
    for (; i < ops.length; i++) {
      switch(ops[i]) {
      case 'g': l = l.cons(EAtom.intern("global")); break;
      case 'u': l = l.cons(EAtom.intern("unicode")); break;
      case 'i': l = l.cons(EAtom.intern("caseless")); break;
      case 'f': l = l.cons(EAtom.intern("firstline")); break;
      case 'm': l = l.cons(EAtom.intern("multiline")); break;
      case 's': l = l.cons(EAtom.intern("dotall")); break;
      default: throw new RuntimeException("unsupported regex option '"+((char)ops[i])+"'");
View Full Code Here

    ESeq l = ERT.NIL;
    for (; i < ops.length; i++) {
      switch(ops[i]) {
      case 'g': l = l.cons(EAtom.intern("global")); break;
      case 'u': l = l.cons(EAtom.intern("unicode")); break;
      case 'i': l = l.cons(EAtom.intern("caseless")); break;
      case 'f': l = l.cons(EAtom.intern("firstline")); break;
      case 'm': l = l.cons(EAtom.intern("multiline")); break;
      case 's': l = l.cons(EAtom.intern("dotall")); break;
      default: throw new RuntimeException("unsupported regex option '"+((char)ops[i])+"'");
      }
View Full Code Here

    for (; i < ops.length; i++) {
      switch(ops[i]) {
      case 'g': l = l.cons(EAtom.intern("global")); break;
      case 'u': l = l.cons(EAtom.intern("unicode")); break;
      case 'i': l = l.cons(EAtom.intern("caseless")); break;
      case 'f': l = l.cons(EAtom.intern("firstline")); break;
      case 'm': l = l.cons(EAtom.intern("multiline")); break;
      case 's': l = l.cons(EAtom.intern("dotall")); break;
      default: throw new RuntimeException("unsupported regex option '"+((char)ops[i])+"'");
      }
    }
View Full Code Here

      switch(ops[i]) {
      case 'g': l = l.cons(EAtom.intern("global")); break;
      case 'u': l = l.cons(EAtom.intern("unicode")); break;
      case 'i': l = l.cons(EAtom.intern("caseless")); break;
      case 'f': l = l.cons(EAtom.intern("firstline")); break;
      case 'm': l = l.cons(EAtom.intern("multiline")); break;
      case 's': l = l.cons(EAtom.intern("dotall")); break;
      default: throw new RuntimeException("unsupported regex option '"+((char)ops[i])+"'");
      }
    }
    return l;
View Full Code Here

      case 'g': l = l.cons(EAtom.intern("global")); break;
      case 'u': l = l.cons(EAtom.intern("unicode")); break;
      case 'i': l = l.cons(EAtom.intern("caseless")); break;
      case 'f': l = l.cons(EAtom.intern("firstline")); break;
      case 'm': l = l.cons(EAtom.intern("multiline")); break;
      case 's': l = l.cons(EAtom.intern("dotall")); break;
      default: throw new RuntimeException("unsupported regex option '"+((char)ops[i])+"'");
      }
    }
    return l;
  }
View Full Code Here

    IPersistentCollection set = (IPersistentCollection) ipm.valAt(key);
    ESeq res = ERT.NIL;
    if (set == null) return res;
    for(ISeq s = set.seq(); s != null; s = s.next())
    {
      res = res.cons((EObject) s.first());
    }   
    return res.reverse();
  }

  @Override
View Full Code Here

     
        ESeq list;
        if (o2.capture_spec == am_all) {
          ESeq l = ERT.NIL;
          for (int i = mr.groupCount(); i >= 0; i--) {
            l = l.cons( capture (subject, mr, i, o2) );
          }
         
          result = result.cons(l);
        } else if ((list = o2.capture_spec.testSeq()) != null) {
          ESeq l = ERT.NIL;
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.