change name

pull/10/head
Matthew Butterick 8 years ago
parent 5607a7aa02
commit fb26d2b7cd

@ -967,11 +967,11 @@ DrRacket should highlight the offending locations in the source.}
@defproc[(apply-tokenizer [tokenizer procedure?]
[source-string (or/c string?
@defproc[(apply-tokenizer-maker [tokenizer-maker procedure?]
[source (or/c string?
input-port?)])
list?]{
Repeatedly apply @racket[tokenizer] to @racket[source-string], gathering the resulting tokens into a list. Useful for testing or debugging a tokenizer.
Repeatedly apply @racket[tokenizer-maker] to @racket[source], gathering the resulting tokens into a list. @racket[source] can be a string or an input port. Useful for testing or debugging a tokenizer.
}

@ -60,8 +60,9 @@
(exn:fail:parsing-srclocs instance)))
(provide apply-tokenizer)
(define (apply-tokenizer tokenize in)
(provide apply-tokenizer-maker
(rename-out [apply-tokenizer-maker apply-tokenizer]))
(define (apply-tokenizer-maker tokenize in)
(define input-port (if (string? in)
(open-input-string in)
in))

Loading…
Cancel
Save