Package org.eclipse.imp.pdb.facts

Examples of org.eclipse.imp.pdb.facts.IListWriter.done()


        }
       
        rs.close();
        stmt.close();
       
        return lw.done();
      } else {
        throw RuntimeExceptionFactory.illegalArgument(connection, null, null, "Connection does not exist.");
      }
    } catch (SQLException sqle) {
      throw RuntimeExceptionFactory.illegalArgument(connection, null, null, sqle.getMessage());
View Full Code Here


        }
       
        rs.close();
        stmt.close();
       
        return lw.done();
      } else {
        throw RuntimeExceptionFactory.illegalArgument(connection, null, null, "Connection does not exist.");
      }
    } catch (SQLException sqle) {
      throw RuntimeExceptionFactory.illegalArgument(connection, null, null, sqle.getMessage());
View Full Code Here

      } else {
        IListWriter writer = ValueFactoryFactory.getValueFactory().listWriter();
        for(int i = posArityMinusOne; i < arity - 1; i++) {
          writer.append((IValue) stack[start + i]);
        }
        this.stack[this.sp++] = writer.done();
      }
      this.stack[this.sp++] = stack[start + arity - 1]; // The keyword arguments
    }   
    this.sp = function.nlocals;
    return start;
View Full Code Here

 
  private IValue genList(Type type){
    IListWriter writer = vf.listWriter(); // type.writer(vf);

    if (maxDepth <= 0 || (stRandom.nextInt(2) == 0)) {
      return writer.done();
    } else {
      RandomValueTypeVisitor visitor = descend();
      IValue element = visitor.generate(type.getElementType());
      if (element != null) {
        writer.append(element);
View Full Code Here

      IValue element = visitor.generate(type.getElementType());
      if (element != null) {
        writer.append(element);
      }
      writer.appendAll((IList) visitor.generate(type));
      return writer.done();
    }
  }

  @Override
  public IValue visitList(Type type) {
View Full Code Here

           IListWriter w = vf.listWriter();
           IList args = TreeAdapter.getArgs(tree);
           for (IValue arg : args) {
             w.append(arg.accept(this));
           }
           args = w.done();
          
           return TreeAdapter.setArgs(tree, args);
         }
       }
View Full Code Here

            IListWriter w = eval.getValueFactory().listWriter();
            IList args = TreeAdapter.getArgs(tree);
            for (IValue elem : args) {
              w.append(elem.accept(this));
            }
            args = w.done();
           
            return TreeAdapter.setArgs(tree, args);
          }
         
          IConstructor type = retrieveHoleType(tree);
View Full Code Here

        public IConstructor visitTreeAmb(IConstructor arg)  {
          ISetWriter w = vf.setWriter();
          for (IValue elem : TreeAdapter.getAlternatives(arg)) {
            w.insert(elem.accept(this));
          }
          return arg.set("alternatives", w.done());
        }
      });
  }
  private static boolean containsBackTick(char[] data, int offset) {
View Full Code Here

        continue;
      }
    }
   
    IString name = vf.string(e.getName());
    return vf.constructor(Factory.Node_element, convertNamespace(e.getNamespace()), name, kids.done());
  }

  private IConstructor convertNamespace(Namespace ns) {
    if (ns == Namespace.NO_NAMESPACE) {
      return vf.constructor(Factory.Namespace_none);
View Full Code Here

    } else {
      for (int j = first; j >= 0 && j > end && j < getValue().length(); j += increment) {
        w.append(getValue().get(j));
      }
    }
    return makeResult(TypeFactory.getInstance().listType(getType().getElementType()), w.done(), ctx);
  }

  @Override
  protected <U extends IValue> Result<U> addList(ListResult s) {
    return makeResult(type.lub(s.type), s.getValue().concat(getValue()), 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.