Skip to main content

diagnose_file

Function diagnose_file 

Source
pub fn diagnose_file(
    path: &Path,
) -> Result<(ResourceDefinition, Vec<Diagnostic>), ParseError>
Expand description

Parse and diagnose a resource file. When the saphyr-spans feature is enabled and the file parses cleanly under saphyr, diagnostics carry source spans for root-level codes. Otherwise spans are absent.

Returns the parsed ResourceDefinition along with the diagnostics so callers don’t have to re-parse the file for additional analysis.