document raco read

This commit is contained in:
Matthew Flatt 2015-06-03 11:53:38 -06:00
parent 495784ed49
commit 4ba3adf11b
3 changed files with 29 additions and 2 deletions

View File

@ -6,8 +6,8 @@
@title[#:tag "expand"]{@exec{raco expand}: Macro Expansion} @title[#:tag "expand"]{@exec{raco expand}: Macro Expansion}
The @exec{raco expand} command macro expands the contents of The @exec{raco expand} command macro-expands and pretty-prints the
the given source files. Also see @racket[expand]. contents of the given source files. See also @racket[expand].
Command-line flags: Command-line flags:

View File

@ -30,6 +30,7 @@ a typical Racket installation.
@include-section["test.scrbl"] @include-section["test.scrbl"]
@include-section["docs.scrbl"] @include-section["docs.scrbl"]
@include-section["expand.scrbl"] @include-section["expand.scrbl"]
@include-section["read.scrbl"]
@include-section["scribble.scrbl"] @include-section["scribble.scrbl"]
@include-section["command.scrbl"] @include-section["command.scrbl"]
@include-section["config.scrbl"] @include-section["config.scrbl"]

View File

@ -0,0 +1,26 @@
#lang scribble/doc
@(require scribble/manual
scribble/bnf
"common.rkt"
(for-label racket/base))
@title[#:tag "read"]{@exec{raco read}: Reading and Pretty-Printing}
@; to associate `history` to the right package:
@(declare-exporting compiler/commands/read)
The @exec{raco expand} command @racket[read]s and pretty-prints the
contents of the given files. This command is useful for showing
how a @tt{#reader} or @hash-lang[]-based reader extension converts
input to an S-expression. It is also useful for pretty-printing a term
that is already in S-expression form.
Command-line flags:
@itemlist[
@item{@Flag{n} @nonterm{n} or @DFlag{columns} @nonterm{n} --- format output for a display with @nonterm{n} columns}
@item{@Flag{h} or @DFlag{help} --- show help information for this command}
@item{@DFlag{} --- do not treat remaining arguments as switches}
]
@history[#:added "1.3"]