Browse Source

Insert semicolon after class definition with no constructor.

Previously:

Main = function () { }

now:

Main = function () { };
Luca Deltodesco 12 years ago
parent
commit
c296304b0c
1 changed files with 1 additions and 1 deletions
  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;