calculate_complexity_from_source

Function calculate_complexity_from_source 

Source
pub fn calculate_complexity_from_source(
    source: &str,
    language: Language,
) -> Result<ComplexityMetrics, String>
Expand description

Calculate complexity for source code without needing a tree-sitter node

This is a convenience function that handles the parsing internally. Returns an error if the source cannot be parsed.