on master help sign in
javascript: fix & in names
b458c70raichoo
src/IRTS/CodegenJavaScript.hs+1
@@ -130,6 +130,7 @@ translateIdentifier =
130 replaceBadChars '>' = "__gt__"
130 replaceBadChars '>' = "__gt__"
131 replaceBadChars '=' = "__eq__"
131 replaceBadChars '=' = "__eq__"
132 replaceBadChars '|' = "__pipe__"
132 replaceBadChars '|' = "__pipe__"
133+ replaceBadChars '&' = "__amp__"
133 replaceBadChars '\'' = "__apo__"
134 replaceBadChars '\'' = "__apo__"
134 replaceBadChars c
135 replaceBadChars c
135 | isDigit c = "__" ++ [c] ++ "__"
136 | isDigit c = "__" ++ [c] ++ "__"