"String.fromCharCode(x)"))
(define-builtin characterp (x)
- (js!bool (code "(typeof(" x ") == \"string\")")))
+ (js!bool
+ (js!selfcall
+ "var x = " x ";" *newline*
+ "return (typeof(" x ") == \"string\") && x.length == 1;")))
(define-builtin char-to-string (x)
(type-check (("x" "number" x))
":" name)))))
((integerp form) (integer-to-string form))
((floatp form) (float-to-string form))
+ ((characterp form)
+ (concat "#\\"
+ (case form
+ (#\newline "newline")
+ (#\space "space")
+ (otherwise (string form)))))
((stringp form) (concat "\"" (escape-string form) "\""))
((functionp form)
(let ((name (oget form "fname")))