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)]
|
@defproc[(make-readtable [readtable (or/c readtable? #f)]
|
||||||
[key (or/c char? #f)]
|
[key (or/c char? #f)]
|
||||||
[mode (or/c (or/c 'terminating-macro
|
[mode (or/c 'terminating-macro
|
||||||
'non-terminating-macro
|
'non-terminating-macro
|
||||||
'dispatch-macro)
|
'dispatch-macro
|
||||||
char?)]
|
char?)]
|
||||||
[action (or/c procedure?
|
[action (or/c procedure?
|
||||||
readtable?)]
|
readtable?
|
||||||
...+)
|
#f)]
|
||||||
|
...)
|
||||||
readtable?]{
|
readtable?]{
|
||||||
|
|
||||||
Creates a new readtable that is like @racket[readtable] (which can be
|
Creates a new readtable that is like @racket[readtable] (which can be
|
||||||
@racket[#f] to indicate the default readtable),
|
@racket[#f] to indicate the default readtable),
|
||||||
except that the reader's behavior is modified for each
|
except that the reader's behavior is modified for each
|
||||||
@racket[key] according to the given @racket[mode] and
|
@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
|
to all three of @racket[key], @racket[mode], and @racket[action]; in
|
||||||
other words, the total number of arguments to @racket[make-readtable]
|
other words, the total number of arguments to @racket[make-readtable]
|
||||||
must be @math{1} modulo @math{3}.
|
must be @math{1} modulo @math{3}.
|
||||||
|
|
|
@ -54515,7 +54515,7 @@ static const char *startup_source =
|
||||||
"(let-values()"
|
"(let-values()"
|
||||||
"(raise-arguments-error"
|
"(raise-arguments-error"
|
||||||
" 'make-readtable"
|
" 'make-readtable"
|
||||||
"(if key_0"
|
"(if(char? mode_0)"
|
||||||
" \"expected readtable or #f argument after character argument\""
|
" \"expected readtable or #f argument after character argument\""
|
||||||
" \"expected procedure argument after symbol argument\")"
|
" \"expected procedure argument after symbol argument\")"
|
||||||
" \"given\""
|
" \"given\""
|
||||||
|
|
|
@ -61331,7 +61331,7 @@
|
||||||
(if (null? (cddr args_1))
|
(if (null? (cddr args_1))
|
||||||
(raise-arguments-error
|
(raise-arguments-error
|
||||||
'make-readtable
|
'make-readtable
|
||||||
(if key_0
|
(if (char? mode_0)
|
||||||
"expected readtable or #f argument after character argument"
|
"expected readtable or #f argument after character argument"
|
||||||
"expected procedure argument after symbol argument")
|
"expected procedure argument after symbol argument")
|
||||||
"given"
|
"given"
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
;; Target is what the key is mapped to
|
;; Target is what the key is mapped to
|
||||||
(when (null? (cddr args))
|
(when (null? (cddr args))
|
||||||
(raise-arguments-error 'make-readtable
|
(raise-arguments-error 'make-readtable
|
||||||
(if key
|
(if (char? mode)
|
||||||
"expected readtable or #f argument after character argument"
|
"expected readtable or #f argument after character argument"
|
||||||
"expected procedure argument after symbol argument")
|
"expected procedure argument after symbol argument")
|
||||||
"given" mode))
|
"given" mode))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user