refuse a char literal that is not one byte
A char is C's, and #\λ came out a multi-character constant whose value is the C compiler's to choose.
This commit is contained in:
@@ -115,6 +115,14 @@
|
||||
(test "a surrogate is no character"
|
||||
"no character has this code point" (read-error "\"\\uD800\""))
|
||||
|
||||
;; A char is C's, one byte, and #\λ came out a multi-character
|
||||
;; constant whose value is the compiler's to choose
|
||||
(test "a char is one byte"
|
||||
"a char is one byte, and this is not: write its code point, or a string"
|
||||
(read-error "#\\λ"))
|
||||
(test "Latin-1 is no exception" #t (string? (read-error "#\\é")))
|
||||
(reader-test '(#\a #\~ #\space) "#\\a #\\~ #\\space")
|
||||
|
||||
;; `;' comments are preserved as (comment "...") forms
|
||||
(reader-test '((comment " hi")) "; hi")
|
||||
(reader-test '((comment ";; Prototypes")) ";;; Prototypes")
|
||||
|
||||
Reference in New Issue
Block a user