expander: fix make-readtable's error message and doc
This commit is contained in:
parent
c3e54219ff
commit
bad18f5be6
|
@ -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}.
|
||||
|
|
|
@ -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\""
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue
Block a user