pub fn parse(input: &str) -> Result<Program, Vec<Diagnostic>>Expand description
Parse a .fi program implementation with error recovery.
On parse errors, skips to the next ; and continues collecting
items and errors. Returns all errors if any occurred.
ยงExamples
let program = fic::parser::parse_program(r#"import "eth.c" as eth;"#).unwrap();
assert_eq!(program.imports.len(), 1);let result = fic::parser::parse_program("not valid;");
assert!(result.is_err());