on master help sign in
javascript: add JSFalse to AST
7b4ca03raichoo
src/IRTS/CodegenJavaScript.hs+4
@@ -52,6 +52,7 @@ data JS = JSRaw String
52 | JSNull
52 | JSNull
53 | JSThis
53 | JSThis
54 | JSTrue
54 | JSTrue
55+ | JSFalse
55 | JSArray [JS]
56 | JSArray [JS]
56 | JSObject [(String, JS)]
57 | JSObject [(String, JS)]
57 | JSString String
58 | JSString String
@@ -123,6 +124,9 @@ compileJS JSThis =
123compileJS JSTrue =
124compileJS JSTrue =
124 "true"
125 "true"
125
126
127+compileJS JSFalse =
128+ "false"
129+
126compileJS (JSArray elems) =
130compileJS (JSArray elems) =
127 "[" ++ intercalate "," (map compileJS elems) ++ "]"
131 "[" ++ intercalate "," (map compileJS elems) ++ "]"
128
132