analyze

Function analyze 

Source
pub fn analyze(
    source: &str,
    file_name: &str,
) -> Result<AnalysisResult, MonError>
Expand description

Analyzes a MON source string, parsing, resolving, and validating it.

This is the primary entry point for processing MON data. It returns an AnalysisResult on success, which contains the fully resolved document and provides methods for serialization and LSP-related queries.

§Arguments

  • source - The MON source code as a string.
  • file_name - The name of the file being analyzed (used for error reporting).

§Errors

Returns a MonError if parsing, resolution, or validation fails.

§Panics

Panics if the current directory cannot be determined when file_name is relative.