Module rustc_ast_pretty::pprust::state
source · Expand description
AST pretty printing.
Note that HIR pretty printing is layered on top of this crate.
Modules§
Structs§
- NoAnn 🔒
Enums§
Constants§
Traits§
- This trait is used for both AST and HIR pretty-printing.
Functions§
- Returns
Noneif the firstcolchars ofscontain a non-whitespace char. Otherwise returnsSome(k)wherekis first char offset after that leading whitespace. Note thatkmay be outside bounds ofs. - Requires you to pass an input filename and reader so that it can scan the input text for comments to copy forward.
- Should two consecutive tokens be printed with a space between them?