cairo-lang-parser 0.1.0

Cairo parser.
Documentation
//! > Test missing token

//! > test_function_name
get_diagnostics

//! > cairo_code
fn f() {
    {4} - 1 + * 2 + {5}
}

//! > expected_diagnostics
error: Missing tokens. Expected an expression.
 --> dummy_file.cairo:2:14
    {4} - 1 + * 2 + {5}
             ^

//! > ==========================================================================

//! > Test complex expression

//! > test_function_name
get_diagnostics

//! > cairo_code
fn f() {
    {5} + match x { E::V1(_) => 4, E::V2(_) => 2 } - if cond { 32 } else { 1 }
}

//! > expected_diagnostics