Expand description
AST pretty printing.
Note that HIR pretty printing is layered on top of this crate.
Modules§
Structs§
Enums§
Constants§
Traits§
- PpAnn
- Print
State - This trait is used for both AST and HIR pretty-printing.
Functions§
- all_
whitespace 🔒 - Returns
None
if the firstcol
chars ofs
contain a non-whitespace char. Otherwise returnsSome(k)
wherek
is first char offset after that leading whitespace. Note thatk
may be outside bounds ofs
. - binop_
to_ 🔒string - doc_
comment_ to_ string - gather_
comments 🔒 - literal_
to_ 🔒string - print_
crate - Requires you to pass an input filename and reader so that it can scan the input text for comments to copy forward.
- space_
between 🔒 - Should two consecutive tokens be printed with a space between them?
- split_
block_ 🔒comment_ into_ lines - trim_
whitespace_ 🔒prefix