Skip to main content

Crate wolf_fmt

Crate wolf_fmt 

Source
Expand description

wolf fmt: the canonical layout of wolfpack source (spec chapter 3, section 8a).

The formatter parses a file, builds a [doc::Doc] from the syntax tree and prints it within 100 columns. Literals, doc comments and ordinary comments are copied from the source text. The result is checked before it is returned: it must parse to the same tree and keep every comment, so a bug in the formatter never changes a program.

Enums§

FmtError
Why a file was not formatted.

Functions§

format
Formats one source file.