Skip to main content

convert_errors

Function convert_errors 

Source
pub fn convert_errors(
    errors: &[ParseError],
    tokens: &[Token],
    interner: &Interner,
    line_index: &LineIndex,
    uri: Option<&Url>,
) -> Vec<Diagnostic>
Expand description

Convert a list of parse errors to LSP diagnostics.

tokens and uri enable DiagnosticRelatedInformation linking an error to its cause site (e.g. use-after-move → the Give statement). Pass &[] and None when neither is available.