Function parse

Source
pub fn parse<S: AsRef<str> + Clone + Display>(
    input: &[u8],
    file_type: FileType,
    parse_options: &ParseOptions,
    file_id: S,
    writer: &mut dyn WriteColor,
    config: &Config,
) -> Option<Problem>
Expand description

Parse input using the parser for the given file_type, emitting errors or warnings to writer

file_id is an identifier for the file used for error reporting. config configures how diagnostics are rendered.

If you simply want to parse a file with error reporting to stderr, you are probably looking for load_file().