Function load_file

Source
pub fn load_file(
    path: impl AsRef<Path>,
    options: &ParseOptions,
) -> Option<Problem>
Expand description

Load and parse the file at path, reporting errors to stderr

Returns Some(problem) on success, None on error.

Examples found in repository?
examples/load_file.rs (line 9)
4
5
6
7
8
9
10
11
12
13
fn main() {
    let parse_options = ParseOptionsBuilder::default().build().unwrap();

    for arg in std::env::args().skip(1) {
        println!("\nloading {arg} ...");
        if let Some(problem) = load_file(arg, &parse_options) {
            println!("{problem:#?}")
        }
    }
}