Advertisement
Guest User

Untitled

a guest
Apr 1st, 2018
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. (match gen.gcon.main_class with
  2. | Some path when path = cl.cl_path ->
  3. write w "public static void main(String[] args)";
  4. begin_block w;
  5. (try
  6. let t = Hashtbl.find gen.gtypes ([], "Sys") in
  7. match t with
  8. | TClassDecl(cl) when PMap.mem "_args" cl.cl_statics ->
  9. write w "Sys._args = args;"; newline w
  10. | _ -> ()
  11. with | Not_found -> ()
  12. );
  13. (match gen.gcon.main with
  14. | Some(expr) ->
  15. expr_s w (mk_block expr)
  16. | None ->
  17. write w "main();");
  18. end_block w;
  19. newline w
  20. | _ -> ()
  21. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement