Package noop.stdlib

Examples of noop.stdlib.StandardLibraryBuilder


    UUID uuid = UUID.randomUUID();   
    Project project = new Project("Hello World", "com.example", "");
    project.addLibrary(new Library(uuid, "hello")).addFunction(new Function("go"));
    controller.addProject(new NewProjectOperation(project));
    repository.save(project);
    StandardLibraryBuilder stdLib = new StandardLibraryBuilder().build(controller);
    repository.save(stdLib.noop);

    InterpreterMain.main(new String[] {
        "-lib", "com.google.Noop/io",
        "-lib", "com.google.Noop/lang",
View Full Code Here


  private Library library;

  @Before
  public void setUp() {
    Workspace workspace = new Workspace();
    StandardLibraryBuilder stdLib = new StandardLibraryBuilder();
    Controller controller = new Controller(workspace, new VertexCreatingVisitor());
    stdLib.build(controller);
    ArithmeticExample arithmeticExample = new ArithmeticExample(stdLib);
    arithmeticExample.createProgram(controller);
    library = workspace.lookupLibrary(arithmeticExample.uid);
  }
View Full Code Here

  private Library library;

  @Before
  public void setUp() {
    Workspace workspace = new Workspace();
    StandardLibraryBuilder stdLib = new StandardLibraryBuilder();
    Controller controller = new Controller(workspace, new VertexCreatingVisitor());
    stdLib.build(controller);
    ControlFlowExample controlFlowExample = new ControlFlowExample(stdLib);
    controlFlowExample.createProgram(controller);
    library = workspace.lookupLibrary(controlFlowExample.uid);
  }
View Full Code Here

  private Library library;

  @Before
  public void setUp() {
    Workspace workspace = new Workspace();
    StandardLibraryBuilder stdLib = new StandardLibraryBuilder();
    Controller controller = new Controller(workspace, new VertexCreatingVisitor());
    stdLib.build(controller);
    HelloWorldExample helloWorldExample = new HelloWorldExample(stdLib);
    helloWorldExample.createProgram(controller);
    library = workspace.lookupLibrary(helloWorldExample.uid);
  }
View Full Code Here

  public static void main(String[] args) throws FileNotFoundException {
    new DumpExamplesMain(new File(args[0])).run();
  }

  public void run() throws FileNotFoundException {
    StandardLibraryBuilder stdLib = new StandardLibraryBuilder();

    for (Example example : Arrays.asList(
        new Example(stdLib) {
          @Override
          public void createProgram(Controller controller) {}
        },
        new ArithmeticExample(stdLib),
        new HelloWorldExample(stdLib),
        new ControlFlowExample(stdLib))) {
      Workspace workspace = new Workspace();

      Controller controller = new Controller(workspace, new VertexCreatingVisitor());
      stdLib.build(controller);

      example.createProgram(controller);
      for (SerializationFormat serializationFormat : Arrays.asList(DOT, TXT)) {
        String outFileName = example.getClass().getName() + "."
            + serializationFormat.name().toLowerCase();
View Full Code Here

TOP

Related Classes of noop.stdlib.StandardLibraryBuilder

Copyright © 2018 www.massapicom. 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.