소스 검색

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 년 전
부모
커밋
da01e6e474
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;