Exemplo n.º 1
0
 public void generateToFile(@NotNull JsProgram program, @NotNull File file) throws IOException {
   generateCode(program);
   FileWriter writer = new FileWriter(file);
   try {
     writer.write(output.toString());
   } finally {
     writer.close();
   }
 }
Exemplo n.º 2
0
 @NotNull
 public String generateToString(@NotNull JsProgram program) {
   generateCode(program);
   return output.toString();
 }