pub fn parse_defs(src: &[u8]) -> Vec<ast::Definition> {
    let src = str::from_utf8(src).expect("IDL contained invalid UTF-8");

    match webidl::parse_string(src) {
        Ok(defs) => defs,
        Err(error) => panic!("Failed to parse IDL:\n{}\nError: {:?}", src, error),
    }
}
/// Parse WebIDL content into an AST
Parse WebIDL content into an AST
Parse WebIDL content into an AST
pub fn parse_defs(src: &[u8]) -> Vec<ast::Definition> {
    let src = str::from_utf8(src).expect("IDL contained invalid UTF-8");
    match webidl::parse_string(src) {
        Ok(defs) => defs,
        Err(error) => panic!("Failed to parse IDL:\n{}\nError: {:?}", src, error),
    }
}
pub fn parse_defs ( src : & [ u8 ] ) -> Vec < ast :: Definition > { let src = str :: from_utf8 ( src ) . expect ( " " ) ; match webidl :: parse_string ( src ) { Ok ( defs ) => defs , Err ( error ) => panic ! ( " \n \n " src error ) , } }
Parse WebIDL content into an AST
Parse WebIDL content into an AST
src
&[u8]