[−][src]Function sdc_parser::parse_strict
pub fn parse_strict(s: &str) -> Result<Sdc, Error>
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);