cairo-lang-parser 0.1.0

Cairo parser.
Documentation
//! > Test a StatementLet syntax tree

//! > test_function_name
test_partial_parser_tree

//! > cairo_code
struct A {
    a: felt,
}
fn f(x: (A, felt)) {
    let (A { a: mut a }, ref mut b) = x;
}

//! > top_level_kind
StatementLet

//! > ignored_kinds
ExprPath

//! > expected_diagnostics

//! > expected_tree
└── Top level kind: StatementLet
    ├── let_kw (kind: TokenLet): 'let'
    ├── pattern (kind: PatternTuple)
    │   ├── lparen (kind: TokenLParen): '('
    │   ├── patterns (kind: PatternList)
    │   │   ├── item #0 (kind: PatternStruct)
    │   │   │   ├── path (kind: ExprPath) <ignored>
    │   │   │   ├── lbrace (kind: TokenLBrace): '{'
    │   │   │   ├── params (kind: PatternStructParamList)
    │   │   │   │   └── item #0 (kind: PatternStructParamWithExpr)
    │   │   │   │       ├── name (kind: TokenIdentifier): 'a'
    │   │   │   │       ├── colon (kind: TokenColon): ':'
    │   │   │   │       └── pattern (kind: PatternIdentifier)
    │   │   │   │           ├── modifiers (kind: ModifierList)
    │   │   │   │           │   └── child #0 (kind: TokenMut): 'mut'
    │   │   │   │           └── name (kind: TokenIdentifier): 'a'
    │   │   │   └── rbrace (kind: TokenRBrace): '}'
    │   │   ├── separator #0 (kind: TokenComma): ','
    │   │   └── item #1 (kind: PatternIdentifier)
    │   │       ├── modifiers (kind: ModifierList)
    │   │       │   ├── child #0 (kind: TokenRef): 'ref'
    │   │       │   └── child #1 (kind: TokenMut): 'mut'
    │   │       └── name (kind: TokenIdentifier): 'b'
    │   └── rparen (kind: TokenRParen): ')'
    ├── type_clause (kind: OptionTypeClauseEmpty) []
    ├── eq (kind: TokenEq): '='
    ├── rhs (kind: ExprPath) <ignored>
    └── semicolon (kind: TokenSemicolon): ';'