on master help sign in
javascript: compile if conditions with noop
commit8d55eaed9e34479517dcf3a145f1c369b48ae311 authorraichoo <raichoo@googlemail.com> dateFri 14 Feb 2014, 15:22 (13 years ago) parent211333c
1 file changed+2−2
src/IRTS/CodegenJavaScript.hs+2−2
src/IRTS/CodegenJavaScript.hs+2−2
@@ -186,8 +186,8 @@ compileJS (JSIndex lhs rhs) =
186186compileJS (JSCond branches) =
187187 intercalate " else " $ map createIfBlock branches
188188 where
189− createIfBlock (JSTrue, e) =
190− "if (true) {\n"
189+ createIfBlock (JSNoop, e) =
190+ "{\n"
191191 ++ compileJS e
192192 ++ ";\n}"
193193 createIfBlock (cond, e) =