read-inside-syntax -> read-syntax-inside
svn: r8912
This commit is contained in:
parent
5a62ed1df2
commit
b866eeb557
|
@ -10,7 +10,7 @@
|
|||
(wrap inp (scribble:read-inside inp)))
|
||||
|
||||
(define/kw (*read-syntax #:optional src [port (current-input-port)])
|
||||
(wrap port (scribble:read-inside-syntax src port)))
|
||||
(wrap port (scribble:read-syntax-inside src port)))
|
||||
|
||||
(define (wrap port body)
|
||||
(let* ([p-name (object-name port)]
|
||||
|
|
|
@ -643,7 +643,7 @@ constructing a reader table based on the current one, and using that
|
|||
in reading.
|
||||
|
||||
> (read-inside [input-port])
|
||||
> (read-inside-syntax [source-name] [input-port])
|
||||
> (read-syntax-inside [source-name] [input-port])
|
||||
|
||||
These `-inside' variants parse as if starting inside a "@{...}", and
|
||||
they return a (syntactic) list. Useful for implementing languages
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
(wrap inp (scribble:read-inside inp)))
|
||||
|
||||
(define (*read-syntax [src #f] [port (current-input-port)])
|
||||
(wrap port (scribble:read-inside-syntax src port)))
|
||||
(wrap port (scribble:read-syntax-inside src port)))
|
||||
|
||||
(define (wrap port body)
|
||||
(let* ([p-name (object-name port)]
|
||||
|
|
|
@ -577,7 +577,7 @@
|
|||
(syntax->datum
|
||||
(inside-dispatcher #f inp (object-name inp) line col pos)))))
|
||||
|
||||
(define (read-inside-syntax [src default-src]
|
||||
(define (read-syntax-inside [src default-src]
|
||||
[inp (current-input-port)])
|
||||
(let*-values ([(line col pos) (port-next-location inp)]
|
||||
[(inside-dispatcher) (make-default-at-dispatcher/inside)])
|
||||
|
@ -586,4 +586,4 @@
|
|||
|
||||
(provide (rename-out [*read read]
|
||||
[*read-syntax read-syntax])
|
||||
read-inside read-inside-syntax)
|
||||
read-inside read-syntax-inside)
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
;; Utilities
|
||||
|
||||
(require (prefix-in at: "reader.ss"))
|
||||
(provide at:read-inside at:read-inside-syntax)
|
||||
(provide at:read-inside at:read-syntax-inside)
|
||||
|
||||
(provide include)
|
||||
(define-syntax (include stx)
|
||||
|
@ -54,7 +54,7 @@
|
|||
[dir dir])
|
||||
#'(let ([contents
|
||||
(with-input-from-file (path->complete-path filename dir)
|
||||
at:read-inside-syntax)])
|
||||
at:read-syntax-inside)])
|
||||
(parameterize ([current-namespace ns])
|
||||
(for ([expr (syntax->list contents)])
|
||||
(show (eval expr)))))))]))
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
(wrap inp (at:read-inside inp)))
|
||||
|
||||
(define (*read-syntax [src #f] [port (current-input-port)])
|
||||
(wrap port (at:read-inside-syntax src port)))
|
||||
(wrap port (at:read-syntax-inside src port)))
|
||||
|
||||
(define (wrap port body)
|
||||
(define (strip-leading-newlines stxs)
|
||||
|
|
|
@ -7,6 +7,6 @@
|
|||
|
||||
@defmodulelang[scribble/doc]{The @schememodname[scribble/doc] language is
|
||||
the same as @schememodname[scribble/doclang], except that
|
||||
@scheme[read-inside-syntax] is used to read the body of the module. In
|
||||
@scheme[read-syntax-inside] is used to read the body of the module. In
|
||||
other words, the module body starts in Scribble ``text'' mode instead
|
||||
of S-expression mode.}
|
||||
|
|
|
@ -11,7 +11,7 @@ changes that make it suitable as a preprocessor language:
|
|||
|
||||
@itemize{
|
||||
|
||||
@item{It uses @scheme[read-inside-syntax] to read the body of the
|
||||
@item{It uses @scheme[read-syntax-inside] to read the body of the
|
||||
module, similar to @secref["docreader"].}
|
||||
|
||||
@item{It has a custom printer (@scheme[current-print]) that displays
|
||||
|
|
|
@ -756,7 +756,7 @@ in reading.
|
|||
}
|
||||
|
||||
@defproc[(read-inside [in input-port? (current-input-port)]) any]{}
|
||||
@defproc[(read-inside-syntax [source-name any/c (object-name in)]
|
||||
@defproc[(read-syntax-inside [source-name any/c (object-name in)]
|
||||
[in input-port? (current-input-port)])
|
||||
(or/c syntax? eof-object?)]{
|
||||
These @schemeid[-inside] variants parse as if starting inside a
|
||||
|
|
Loading…
Reference in New Issue
Block a user