Module state

Source
Expand description

AST pretty printing.

Note that HIR pretty printing is layered on top of this crate.

Modules§

expr 🔒
fixup 🔒
item 🔒

Structs§

Comments
NoAnn 🔒
State

Enums§

AnnNode
MacHeader

Constants§

INDENT_UNIT 🔒

Traits§

PpAnn
PrintState
This trait is used for both AST and HIR pretty-printing.

Functions§

all_whitespace 🔒
Returns None if the first col chars of s contain a non-whitespace char. Otherwise returns Some(k) where k is first char offset after that leading whitespace. Note that k may be outside bounds of s.
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 🔒