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/load_file.rs (
line 8)
3fn main() {
4 let parse_options = ParseOptionsBuilder::default().build().unwrap();
5
6 for arg in std::env::args().skip(1) {
7 println!("\nloading {arg} ...");
8 if let Some(problem) = load_file(arg, &parse_options) {
9 println!("{problem:#?}")
10 }
11 }
12}