expander: fix make-readtable's error message and doc

This commit is contained in:
sorawee 2021-04-16 01:33:23 +07:00 committed by GitHub
parent c3e54219ff
commit bad18f5be6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 9 deletions

View File

@ -69,20 +69,21 @@ otherwise.
@defproc[(make-readtable [readtable (or/c readtable? #f)]
[key (or/c char? #f)]
[mode (or/c (or/c 'terminating-macro
'non-terminating-macro
'dispatch-macro)
[mode (or/c 'terminating-macro
'non-terminating-macro
'dispatch-macro
char?)]
[action (or/c procedure?
readtable?)]
...+)
readtable?
#f)]
...)
readtable?]{
Creates a new readtable that is like @racket[readtable] (which can be
@racket[#f] to indicate the default readtable),
except that the reader's behavior is modified for each
@racket[key] according to the given @racket[mode] and
@racket[action]. The @racket[...+] for @racket[make-readtable] applies
@racket[action]. The @racket[...] for @racket[make-readtable] applies
to all three of @racket[key], @racket[mode], and @racket[action]; in
other words, the total number of arguments to @racket[make-readtable]
must be @math{1} modulo @math{3}.

View File

@ -54515,7 +54515,7 @@ static const char *startup_source =
"(let-values()"
"(raise-arguments-error"
" 'make-readtable"
"(if key_0"
"(if(char? mode_0)"
" \"expected readtable or #f argument after character argument\""
" \"expected procedure argument after symbol argument\")"
" \"given\""

View File

@ -61331,7 +61331,7 @@
(if (null? (cddr args_1))
(raise-arguments-error
'make-readtable
(if key_0
(if (char? mode_0)
"expected readtable or #f argument after character argument"
"expected procedure argument after symbol argument")
"given"

View File

@ -78,7 +78,7 @@
;; Target is what the key is mapped to
(when (null? (cddr args))
(raise-arguments-error 'make-readtable
(if key
(if (char? mode)
"expected readtable or #f argument after character argument"
"expected procedure argument after symbol argument")
"given" mode))