macro_rules! docs {
($alloc: expr, $first: expr $(,)?) => { ... };
($alloc: expr, $first: expr $(, $rest: expr)+ $(,)?) => { ... };
}Expand description
Concatenates a number of documents (or values that can be converted into a document via the
Pretty trait, like &str)
use pretty_print::docs;
let doc =
docs!["let", arena.softline(), "x", arena.softline(), "=", arena.softline(), Some("123"),];
assert_eq!(doc.1.pretty(80).to_string(), "let x = 123");