From e9019fb3b42f5b53ab7afabae167f6fccb4933b9 Mon Sep 17 00:00:00 2001 From: Raimon Grau Date: Thu, 2 May 2013 21:39:35 +0200 Subject: [PATCH] fixed format for compatibility with new char implementation --- src/compiler.lisp | 4 ++-- src/print.lisp | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/compiler.lisp b/src/compiler.lisp index eadbf39..49ea708 100644 --- a/src/compiler.lisp +++ b/src/compiler.lisp @@ -1478,8 +1478,8 @@ "return (typeof(" x ") == \"string\") && x.length == 1;"))) (define-builtin char-to-string (x) - (type-check (("x" "number" x)) - "String.fromCharCode(x)")) + (type-check (("x" "string" x)) + "(x)")) (define-builtin stringp (x) (js!bool (code "(typeof(" x ") == \"string\")"))) diff --git a/src/print.lisp b/src/print.lisp index 9db5354..79a5359 100644 --- a/src/print.lisp +++ b/src/print.lisp @@ -42,7 +42,9 @@ (#\newline "newline") (#\space "space") (otherwise (string form))))) - ((stringp form) (concat "\"" (escape-string form) "\"")) + ((stringp form) (if *print-escape* + (concat "\"" (escape-string form) "\"") + form)) ((functionp form) (let ((name (oget form "fname"))) (if name -- 1.7.10.4