Skip to main content

format_source

Function format_source 

Source
pub fn format_source(source: &str, filename: &str) -> FormatResult
Expand description

Format a Bock source string, returning the formatted output.

Parses the source, reformats the AST, and emits canonical source text. If parsing produces errors, the original source is returned unchanged.