Handbook
Glossary
with-pprint ( obj quot -- )
Factor handbook
»
Developer tools
»
The prettyprinter
»
Extending the prettyprinter
»
Prettyprinter sections
Next:
section
Vocabulary
prettyprint
.
sections
Inputs
obj
an
object
quot
a
quotation
Outputs
None
Word description
Sets up the prettyprinter and calls the quotation in a new scope. The quotation should add sections to the top-level block. When the quotation returns, the top-level block is printed to
output-stream
.
See also
pprint
,
pprint*
Definition
USING:
continuations
kernel
;
IN:
prettyprint.sections
:
with-pprint
( obj quot -- )
[
f
make-pprint
]
curry
[
drop
[
error-in-pprint
]
f
make-pprint
]
recover
drop
do-pprint
;
inline