Package org.eclipse.imp.pdb.facts

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


      java.lang.String [] entries = rex.getResolverRegistry().listEntries(sloc.getURI());
      IListWriter w = values.listWriter();
      for(java.lang.String entry : entries){
        w.append(values.string(entry));
      }
      return w.done();
    } catch(FileNotFoundException e){
      throw RuntimeExceptionFactory.pathNotFound(sloc, null, null);
    } catch (IOException e) {
      throw RuntimeExceptionFactory.io(values.string(e.getMessage()), null, null);
    }
View Full Code Here


          throw RuntimeExceptionFactory.io(values.string(ioex.getMessage()), null, null);
        }
      }
    }

    return w.done();
  }
 
  public IList readFileBytes(ISourceLocation sloc, RascalExecutionContext rex){
    IListWriter w = values.listWriter();
    sloc = rex.resolveSourceLocation(sloc);
View Full Code Here

          throw RuntimeExceptionFactory.io(values.string(ioex.getMessage()), null, null);
        }
      }
    }

    return w.done();
  }
 
 
 
  @Override
View Full Code Here

      do {
        w.append(iFrom);
        iFrom = iFrom.add(diff);
      } while (iFrom.greaterEqual(iTo).getValue());
    }
    return makeResult(tf.listType(resultType), w.done(), ctx)
  }
 
  @Override
  protected <U extends IValue> Result<U> addListRelation(ListRelationResult that) {
    return that.addRational(this);
View Full Code Here

        w.insert(u);
      }
      // TODO Check if a path was found at all; it could be that we just hit the root of the graph.
    }
    w.insert(start);
    return w.done();
  }
 
  public void print(IValue arg, IEvaluatorContext eval){
    PrintWriter currentOutStream = eval.getStdOut();
   
View Full Code Here

        }catch(IOException ioex){
          throw RuntimeExceptionFactory.io(values.string(ioex.getMessage()), null, null);
        }
      }
    }
    return w.done();
  }
 
  // REFLECT -- copy in PreludeCompiled
  public IValue exists(ISourceLocation sloc, IEvaluatorContext ctx) {
    sloc = ctx.getHeap().resolveSourceLocation(sloc);
View Full Code Here

          IValue newKid = oldKid.accept(new PushDownTreeVisitor<E>(isDeferred));
         
          writer.append(newKid);
        }

        IList children = writer.done();

        // update current tree with processed children
        arg = TreeAdapter.setArgs(arg, children);
      }
   
View Full Code Here

      java.lang.String [] entries = ctx.getResolverRegistry().listEntries(sloc.getURI());
      IListWriter w = values.listWriter();
      for(java.lang.String entry : entries){
        w.append(values.string(entry));
      }
      return w.done();
    } catch(FileNotFoundException e){
      throw RuntimeExceptionFactory.pathNotFound(sloc, null, null);
    } catch (IOException e) {
      throw RuntimeExceptionFactory.io(values.string(e.getMessage()), null, null);
    }
View Full Code Here

 
  public IList getContext() {
    IListWriter lw = eval.getValueFactory().listWriter();
    for (IValue v : this.traversalContext)
      lw.append(v);
    return lw.done().reverse();
  }

  public static class CaseBlockList {
    private java.util.List<CaseBlock> cases;
    private boolean allConcretePatternCases = true;
View Full Code Here

            w.append(list.get(i));
          }
        }
        tr.changed = hasChanged;
        tr.matched = hasMatched;
        args[1] = w.done();
      } else {
        args[1] = list;
      }
    } else {
      // Constructor is not "appl", or at least one of the patterns is not a concrete pattern
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.