(null ch))))
(defun special-escape (s package)
- (return-from special-escape s)
(if (or (potential-number s)
(special-symbol-name s :uppercase (not (eq package (find-package "JS")))))
(let ((result "|"))
(#\'
(list 'function (ls-read-1 stream)))
(#\( (list-to-vector (%read-list stream)))
- (#\: (make-symbol (string-upcase (read-until stream #'terminalp))))
+ (#\: (make-symbol
+ (unescape
+ (string-upcase-noescaped
+ (read-escaped-until stream #'terminalp)))))
(#\\
(let ((cname
(concat (string (%read-char stream))
-(dolist (s '(foo fo\o 1..2 \1 \-10 \.\.\. 1E \1E+2 1E+))
- (test (let ((x (read-from-string (prin1-to-string s))))
- (and (symbolp x) (equal (symbol-name x) (symbol-name s))))))
+(test (let ((x (read-from-string (prin1-to-string 'foo))))
+ (and (symbolp x) (equal (symbol-name x) "FOO"))))
+(test (let ((x (read-from-string (prin1-to-string 'fo\o))))
+ (and (symbolp x) (equal (symbol-name x) "FOo"))))
+(test (let ((x (read-from-string (prin1-to-string '1..2))))
+ (and (symbolp x) (equal (symbol-name x) "1..2"))))
+(test (let ((x (read-from-string (prin1-to-string '\1))))
+ (and (symbolp x) (equal (symbol-name x) "1"))))
+(test (let ((x (read-from-string (prin1-to-string '\-10))))
+ (and (symbolp x) (equal (symbol-name x) "-10"))))
+(test (let ((x (read-from-string (prin1-to-string '\.\.\.))))
+ (and (symbolp x) (equal (symbol-name x) "..."))))
+(test (let ((x (read-from-string (prin1-to-string '1E))))
+ (and (symbolp x) (equal (symbol-name x) "1E"))))
+(test (let ((x (read-from-string (prin1-to-string '\1E+2))))
+ (and (symbolp x) (equal (symbol-name x) "1E+2"))))
+(test (let ((x (read-from-string (prin1-to-string '1E+))))
+ (and (symbolp x) (equal (symbol-name x) "1E+"))))