Skip to main content

parse_text_recovering_with_file

Function parse_text_recovering_with_file 

Source
pub fn parse_text_recovering_with_file(
    source: &str,
    name: &str,
    options: ParseOptions,
    path: &Path,
) -> (Module, Vec<Diagnostic>)
Expand description

Parse buffer text as above but always return the module, even when diagnostics were recorded. Tooling (editor diagnostics on broken files) needs the partial tree; crucially, the file context is preserved so include statements never fall back to resolving from the process working directory.