pruned unstable/port

This commit is contained in:
Ryan Culpepper 2011-12-17 22:39:29 -07:00
parent fd2554d6fc
commit a4c6c7cfce
3 changed files with 2 additions and 33 deletions

View File

@ -22,13 +22,4 @@
(parameterize ([current-input-port
(open-input-string "1 2 3")])
(read-all-syntax)))
(list 1 2 3))))
(test-suite "port->srcloc"
(test-ok (define port (open-input-string "\n x "))
(port-count-lines! port)
(check-equal? (port->srcloc port)
(make-srcloc 'string 1 0 1 0))
(read port)
(check-equal? (port->srcloc port 'here 1)
(make-srcloc 'here 2 2 4 1))))))
(list 1 2 3))))))

View File

@ -33,5 +33,4 @@
[read-all (->* [] [(-> any/c) input-port?] list?)]
[read-all-syntax
(->* [] [(-> (or/c syntax? eof-object?)) input-port?]
(syntax/c list?))]
[port->srcloc (->* [port?] [any/c exact-nonnegative-integer?] srcloc?)])
(syntax/c list?))])

View File

@ -51,25 +51,4 @@ of the result spans the entire portion of the port that was read.
}
@defproc[(port->srcloc [port port?]
[source any/c (object-name port)]
[span exact-nonnegative-integer? 0])
srcloc?]{
Produces a @racket[srcloc] structure representing the current position of a
port, using the provided @racket[source] and @racket[span] values to fill in
missing fields. This function relies on @racket[port-next-location], so line
counting must be enabled for @racket[port] to get meaningful results.
@defexamples[
#:eval the-eval
(define port (open-input-string "1 2 3"))
(port-count-lines! port)
(read port)
(port->srcloc port)
(port->srcloc port "1 2 3" 1)
]
}
@(close-eval the-eval)