Browse Source

Set ctx.separator to false after untyped __js__ block.

Effect is to ensure there's no ';' inserted when last character
of __js__ block was { } or :
Luca Deltodesco 12 years ago
parent
commit
da01e6e474
1 changed files with 1 additions and 1 deletions
  1. 1 1
      genjs.ml

+ 1 - 1
genjs.ml

@@ -375,7 +375,7 @@ let rec gen_call ctx e el in_value =
 		concat ctx "," (gen_value ctx) params;
 		spr ctx ")";
 	| TLocal { v_name = "__js__" }, [{ eexpr = TConst (TString code) }] ->
-		spr ctx (String.concat "\n" (ExtString.String.nsplit code "\r\n"))
+		spr ctx (String.concat "\n" (ExtString.String.nsplit code "\r\n")); ctx.separator <- false;
 	| TLocal { v_name = "__instanceof__" },  [o;t] ->
 		spr ctx "(";
 		gen_value ctx o;