cairo-lang-parser 1.1.0-alpha0

Cairo parser.
Documentation
//! > Test attributes without an item.

//! > test_runner_name
test_partial_parser_tree

//! > cairo_code
#[aaa]
3

//! > top_level_kind
Item

//! > ignored_kinds

//! > expected_diagnostics
error: Skipped tokens. Expected: Const/Module/Use/FreeFunction/ExternFunction/ExternType/Trait/Impl/Struct/Enum/TypeAlias or an attribute.
 --> dummy_file.cairo:2:1
3
^

error: Missing tokens. Expected an item after attributes.
 --> dummy_file.cairo:2:2
3
 ^

//! > expected_tree

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

//! > Test attributes without a trait item.

//! > test_runner_name
test_partial_parser_tree

//! > cairo_code
trait Abc {
    #[aaa]
    3
}

//! > top_level_kind
Item

//! > ignored_kinds

//! > expected_diagnostics
error: Skipped tokens. Expected: trait item or an attribute.
 --> dummy_file.cairo:3:5
    3
    ^

error: Missing tokens. Expected a trait item after attributes.
 --> dummy_file.cairo:3:6
    3
     ^

//! > expected_tree

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

//! > Test attributes without an impl item.

//! > test_runner_name
test_partial_parser_tree

//! > cairo_code
impl Abc of Def {
    #[aaa]
    3
}

//! > top_level_kind
Item

//! > ignored_kinds

//! > expected_diagnostics
error: Skipped tokens. Expected: impl item or an attribute.
 --> dummy_file.cairo:3:5
    3
    ^

error: Missing tokens. Expected an impl item after attributes.
 --> dummy_file.cairo:3:6
    3
     ^

//! > expected_tree