X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=test.lisp;h=adf8c1230c9ce1a3e19e1ad3eaf72f7ef386556a;hb=4f17b56fa136f97d11975d081a861351eb64db76;hp=101964cd572beba5f20204e7c5001c738507fcc2;hpb=b8bf525d3b0cf41f83de08ac4e43d76edb0174bd;p=jscl.git diff --git a/test.lisp b/test.lisp index 101964c..adf8c12 100644 --- a/test.lisp +++ b/test.lisp @@ -454,13 +454,15 @@ (skip-whitespaces-and-comments stream) (let ((ch (%peek-char stream))) (cond + ((null ch) + (error "Unspected EOF")) ((char= ch #\)) (%read-char stream) nil) ((char= ch #\.) (%read-char stream) - (skip-whitespaces-and-comments stream) (prog1 (ls-read stream) + (skip-whitespaces-and-comments stream) (unless (char= (%read-char stream) #\)) (error "')' was expected.")))) (t @@ -470,8 +472,10 @@ (let ((string "") (ch nil)) (setq ch (%read-char stream)) - (while (not (char= ch #\")) - (when (char= ch #\\) + (while (not (eql ch #\")) + (when (null ch) + (error "Unexpected EOF")) + (when (eql ch #\\) (setq ch (%read-char stream))) (setq string (concat string (string ch))) (setq ch (%read-char stream))) @@ -939,7 +943,7 @@ "})()" *newline*)))) (define-compilation js-eval (string) - (concat "eval(" (ls-compile string env fenv) ")")) + (concat "eval.apply(window, [" (ls-compile string env fenv) "])")) (define-compilation error (string)