Skip to main content

parse_with_formatted_errors

Function parse_with_formatted_errors 

Source
pub fn parse_with_formatted_errors(
    source: &str,
    filename: &str,
) -> (Option<File>, Option<String>)
Expand description

Parse Ato source code and format any errors using ariadne.

Returns the AST if parsing succeeded (possibly with recovered errors), and a formatted error string if there were any errors.