From: David Vázquez Date: Sat, 4 May 2013 18:15:32 +0000 (+0100) Subject: Fix read-float. Define CHAR-UPCASE and CHAR-DOWNCASE X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=28da2f2d608aa74d0b9e308220ffbc5cc740a8ea;p=jscl.git Fix read-float. Define CHAR-UPCASE and CHAR-DOWNCASE --- diff --git a/src/compiler.lisp b/src/compiler.lisp index df148d9..8421b16 100644 --- a/src/compiler.lisp +++ b/src/compiler.lisp @@ -1475,6 +1475,12 @@ "r.type = 'character';" "return r")) +(define-builtin char-upcase (x) + (code x ".toUpperCase()")) + +(define-builtin char-downcase (x) + (code x ".toLowerCase()")) + (define-builtin stringp (x) (js!bool (js!selfcall diff --git a/src/read.lisp b/src/read.lisp index e2c5dfd..9d0ec46 100644 --- a/src/read.lisp +++ b/src/read.lisp @@ -304,8 +304,7 @@ ;; Optional exponent part (when (< index size) ;; Exponent-marker - (unless (member (string-upcase (string (char string index))) - '("E" "S" "F" "D" "L")) + (unless (find (char-upcase (char string index)) "ESFDL") (return)) (incf index) (unless (< index size) (return))