Exemple #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();
   }
 }
Exemple #2
0
 @NotNull
 public String generateToString(@NotNull JsProgram program) {
   generateCode(program);
   return output.toString();
 }