rename `test-reader` → `apply-reader`

v6.3-exception
Matthew Butterick 6 years ago
parent ece33a624e
commit b2c3988d81

@ -2,9 +2,12 @@
(require (for-syntax racket/base racket/syntax br/syntax) br/define syntax/strip-context) (require (for-syntax racket/base racket/syntax br/syntax) br/define syntax/strip-context)
(provide (all-defined-out)) (provide (all-defined-out))
(define (test-reader read-syntax-proc str) (define (apply-reader read-syntax-proc str)
(syntax->datum (read-syntax-proc #f (open-input-string str)))) (syntax->datum (read-syntax-proc #f (open-input-string str))))
;; bw compat
(define test-reader apply-reader)
;; `define-read-functions` simplifies support for the standard reading API, ;; `define-read-functions` simplifies support for the standard reading API,
;; which asks for `read` and `read-syntax`. ;; which asks for `read` and `read-syntax`.
;; in general, `read` is just the datum from the result of `read-syntax`. ;; in general, `read` is just the datum from the result of `read-syntax`.

@ -679,11 +679,11 @@ xs
@defproc[ @defproc[
(test-reader (apply-reader
[read-syntax-proc procedure?] [read-syntax-proc procedure?]
[source-str string?]) [source-str string?])
datum?]{ datum?]{
Applies @racket[read-syntax-proc] to @racket[source-str] as if it were being read in from a source file. Applies @racket[read-syntax-proc] to @racket[source-str] as if it were being read in from a source file. Perhaps helpful for testing & debugging.
} }

Loading…
Cancel
Save