Package org.eclipse.imp.pdb.facts

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


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

    return w.done();
  }
 
  // REFLECT -- copy in PreludeCompiled
  public IList readFileBytes(ISourceLocation sloc, IEvaluatorContext ctx){
    IListWriter w = values.listWriter();
View Full Code Here


        hasMatched |= tr.matched;
      }
     
      tr.changed = hasChanged;
      tr.matched = hasMatched;
      return w.done();
    } else {
      return subject;
    }
  }
View Full Code Here

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

    return w.done();
  }
 
  public IString createLink(IString title, IString target) {
    return values.string("\uE007["+title.getValue().replaceAll("\\]", "_")+"]("+target.getValue()+")");
  }
View Full Code Here

        for (String elem : ctx.getResolverRegistry().listEntries(resolved.getURI())) {
          w.append(resRes.add(makeResult(stringType, vf.string(elem), ctx)).getValue());
        }

        IList result = w.done();
        // a list of loc's
        return makeResult(result.getType(), result, ctx);
       
      } catch (IOException e) {
        throw RuntimeExceptionFactory.io(vf.string(e.getMessage()), ctx.getCurrentAST(), ctx.getStackTrace());
View Full Code Here

      }
      // skip layout
      i++;
    }
   
    return writer.done();
  }
 
  public static boolean isContextFree(IConstructor tree) {
    return SymbolAdapter.isSort(getType(tree));
  }
View Full Code Here

        IValue to = char2int(range.getEnd());
        result.append(factory.constructor(Factory.CharRange_Range, from, to));
      }
    }
   
    return result.done();
  }

  private static IValue char2int(Char character) {
    String s = ((Char.Lexical) character).getString();
    if (s.startsWith("\\")) {
View Full Code Here

    if (obj instanceof Object[]) {
      IListWriter w = values.listWriter(Node);
      for (Object elt: (Object[])obj) {
        w.append(loadRec(elt, anchors, visited, ctx));
      }
      result = values.constructor(Node_sequence, w.done());
    }
    else if (obj instanceof List) {
      IListWriter w = values.listWriter(Node);
      for (Object elt: (List<Object>)obj) {
        w.append(loadRec(elt, anchors, visited, ctx));
View Full Code Here

    else if (obj instanceof List) {
      IListWriter w = values.listWriter(Node);
      for (Object elt: (List<Object>)obj) {
        w.append(loadRec(elt, anchors, visited, ctx));
      }
      result = values.constructor(Node_sequence, w.done());
    }
    else if (obj instanceof Map) {
      IMapWriter w = values.mapWriter(Node, Node);
      Map<Object, Object> m = (Map<Object,Object>)obj;
      for (Map.Entry<Object,Object> e: m.entrySet()) {
View Full Code Here

      IMapWriter w = values.mapWriter(Node, Node);
      Map<Object, Object> m = (Map<Object,Object>)obj;
      for (Map.Entry<Object,Object> e: m.entrySet()) {
        w.put(loadRec(e.getKey(), anchors, visited, ctx), loadRec(e.getValue(), anchors, visited, ctx));
      }
      result = values.constructor(Node_mapping, w.done());
    }
    else {
      throw RuntimeExceptionFactory.illegalArgument(
          values.string(obj.toString() + " (class=" + obj.getClass() + ")"),
          ctx.getCurrentAST(), ctx.getStackTrace());
View Full Code Here

    IListWriter w = codeblock.vf.listWriter();
    for(IValue vlabel : labels){
      String label = ((IString) vlabel).getValue();
      w.append(codeblock.vf.integer(codeblock.getLabelPC(label)));
    }
    codeblock.addCode1(opcode.getOpcode(), codeblock.getConstantIndex(w.done()));
  }
}
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.