Skip to main content

parse

Function parse 

Source
pub fn parse(input: &str) -> Result<System, Vec<Diagnostic>>
Expand description

Parse a .fis system description with error recovery.

On parse errors, skips to the next ; and continues collecting items and errors. Returns all errors if any occurred.

ยงExamples

let system = fic::parser::parse_system("ProtectionDomain pd1(100);").unwrap();
assert_eq!(system.protection_domains.len(), 1);
let result = fic::parser::parse_system("not valid syntax;");
assert!(result.is_err());