1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#![forbid(unsafe_code)]

mod error;
mod leb128;
mod parser;

pub mod source;

pub use error::{Error, ErrorKind, Result};
pub use parser::Parser;
use source::BinarySource;
use wain_ast::Root;

pub fn parse(input: &[u8]) -> Result<'_, Root<'_, BinarySource<'_>>> {
    let mut parser = Parser::new(input);
    parser.parse()
}