Procházet zdrojové kódy

Insert semicolon after class definition with no constructor.

Previously:

Main = function () { }

now:

Main = function () { };
Luca Deltodesco před 12 roky
rodič
revize
c296304b0c
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      genjs.ml

+ 1 - 1
genjs.ml

@@ -935,7 +935,7 @@ let generate_class ctx c =
 		print ctx "%s = $hxClasses[\"%s\"] = " p (dot_path c.cl_path);
 	(match c.cl_constructor with
 	| Some { cf_expr = Some e } -> gen_expr ctx e
-	| _ -> print ctx "function() { }");
+	| _ -> (print ctx "function() { }"); ctx.seperator <- true);
 	newline ctx;
 	if ctx.js_modern && hxClasses then begin
 		print ctx "$hxClasses[\"%s\"] = %s" (dot_path c.cl_path) p;