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.
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 ๐Ÿ”’