Skip to main content

validate_syntax

Function validate_syntax 

Source
pub fn validate_syntax(
    file_path: &str,
    content: &str,
) -> Result<bool, SyntaxError>
Expand description

Validates content as the full text of file_path through julie-extract check before it is written to disk. Returns Ok(true) when the extractor parsed it cleanly, Ok(false) when the extractor has no grammar for the path, and Err(SyntaxError::ParseError) when the parse reported syntax errors.