dbgfmt 0.2.0

Pretty-print Rust Debug trait output with proper indentation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
mod color;
mod formatter;
mod tokenizer;

pub fn format_debug(input: &str, indent_width: usize) -> String {
    let tokens = tokenizer::tokenize(input);
    formatter::format_tokens(&tokens, indent_width)
}

pub fn format_debug_colored(input: &str, indent_width: usize) -> String {
    let tokens = tokenizer::tokenize(input);
    color::format_tokens_colored(&tokens, indent_width)
}