cairo-lang-parser 2.19.0-rc.1

Cairo parser.
Documentation
//! > Illegally escaped short string.

//! > test_runner_name
get_diagnostics

//! > cairo_code
fn foo() {
    let a = '\p';
}

//! > expected_diagnostics
error[E1017]: Invalid string escaping.
 --> dummy_file.cairo:2:14
    let a = '\p';
             ^

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

//! > Illegally escaped short string after non-ASCII character.

//! > test_runner_name
get_diagnostics

//! > cairo_code
fn foo() {
    let a = 'éé\p';
}

//! > expected_diagnostics
error[E1017]: Invalid string escaping.
 --> dummy_file.cairo:2:16
    let a = 'éé\p';
               ^

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

//! > Short string containing unicode characters.

//! > test_runner_name
get_diagnostics

//! > cairo_code
fn foo() {
    let a = '\u{1024}';
}

//! > expected_diagnostics
error[E1018]: Short string literals can only include ASCII characters.
 --> dummy_file.cairo:2:13
    let a = '\u{1024}';
            ^^^^^^^^^^

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

//! > String containing unicode characters.

//! > test_runner_name
get_diagnostics

//! > cairo_code
fn foo() {
    let a = "\u{1024}";
}

//! > expected_diagnostics
error[E1019]: String literals can only include ASCII characters.
 --> dummy_file.cairo:2:13
    let a = "\u{1024}";
            ^^^^^^^^^^