pub fn parse_strict(s: &str) -> Result<Sdc, Error>Expand description
Parse SDC string strictly
This function fails if the input is not valid SDC.
ยงExamples
use sdc_parser::{self, sdc};
let result = sdc_parser::parse_strict("current_instance duv").unwrap();
let expect = sdc::Sdc {
commands: vec![sdc::Command::CurrentInstance(
sdc::CurrentInstance {
instance: Some(String::from("duv"))
}
)]
};
assert_eq!(expect, result);