Skip to main content

make

Function make 

Source
pub fn make() -> Tabnas
Expand description

Build a parser with the jsonic base grammar and the default operator table.

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let parser = tabnas_expr::make();
    let value = tabnas_expr::parse_with(&parser, "(1+2)*3")?;
    assert_eq!(tabnas_expr::simplify(&value).to_string(),
               r#"["*",["(",["+",1,2]],3]"#);
    Ok(())
}