cs: fix printing of symbols that start #%

This commit is contained in:
Matthew Flatt 2019-01-25 14:39:58 -07:00
parent a4821716d9
commit bd6cf17f92
2 changed files with 2 additions and 1 deletions

View File

@ -62,6 +62,7 @@
(ptest "'|apple banana|" '|apple banana|) (ptest "'|apple banana|" '|apple banana|)
(ptest "'||" '||) (ptest "'||" '||)
(ptest "'#:apple" '#:apple) (ptest "'#:apple" '#:apple)
(ptest "'#%apple" '#%apple)
(ptest "\"apple\"" "apple") (ptest "\"apple\"" "apple")
(ptest "#\"apple\"" #"apple") (ptest "#\"apple\"" #"apple")
(ptest "#rx\"apple\"" #rx"apple") (ptest "#rx\"apple\"" #rx"apple")

View File

@ -208,7 +208,7 @@
;; the printer needs to check whether a string parses as a number ;; the printer needs to check whether a string parses as a number
;; for deciding wheter to quote the string ;; for deciding wheter to quote the string
(set-string->number?! (lambda (str) (set-string->number?! (lambda (str)
(not (not (1/string->number str 10 'read))))) (number? (1/string->number str 10 'read))))
;; `set-maybe-raise-missing-module!` is also from the `io` library ;; `set-maybe-raise-missing-module!` is also from the `io` library
(set-maybe-raise-missing-module! maybe-raise-missing-module)) (set-maybe-raise-missing-module! maybe-raise-missing-module))