Skip to main content

render

Function render 

Source
pub fn render(
    diagnostics: &[Diagnostic],
    filename: &str,
    source: &str,
) -> String
Expand description

Render a slice of diagnostics to a string using ariadne for source context.

filename and source must correspond to the file referenced by the diagnostics’ spans. This function is intentionally decoupled from bock-source types so that bock-errors stays dependency-free.