cairo-lang-parser 2.18.0

Cairo parser.
Documentation
//! > Test generic impl param syntax

//! > test_runner_name
test_partial_parser_tree(expect_diagnostics: false)

//! > cairo_code
fn emit<S, +traits::Into<T: S, TEvent>, -traits::Into<S, S>>(ref self: T, event: S) {}

//! > top_level_kind
GenericParamList

//! > ignored_kinds

//! > expected_diagnostics

//! > expected_tree
└── Top level kind: GenericParamList
    ├── item #0 (kind: GenericParamType)
    │   └── name (kind: TokenIdentifier): 'S'
    ├── separator #0 (kind: TokenComma): ','
    ├── item #1 (kind: GenericParamImplAnonymous)
    │   ├── plus (kind: TokenPlus): '+'
    │   ├── trait_path (kind: ExprPath)
    │   │   ├── dollar (kind: OptionTerminalDollarEmpty) []
    │   │   └── segments (kind: ExprPathInner)
    │   │       ├── item #0 (kind: PathSegmentSimple)
    │   │       │   └── ident (kind: TokenIdentifier): 'traits'
    │   │       ├── separator #0 (kind: TokenColonColon): '::'
    │   │       └── item #1 (kind: PathSegmentWithGenericArgs)
    │   │           ├── ident (kind: TokenIdentifier): 'Into'
    │   │           ├── separator (kind: OptionTerminalColonColonEmpty) []
    │   │           └── generic_args (kind: GenericArgs)
    │   │               ├── langle (kind: TokenLT): '<'
    │   │               ├── generic_args (kind: GenericArgList)
    │   │               │   ├── item #0 (kind: GenericArgNamed)
    │   │               │   │   ├── name (kind: TokenIdentifier): 'T'
    │   │               │   │   ├── colon (kind: TokenColon): ':'
    │   │               │   │   └── value (kind: ExprPath)
    │   │               │   │       ├── dollar (kind: OptionTerminalDollarEmpty) []
    │   │               │   │       └── segments (kind: ExprPathInner)
    │   │               │   │           └── item #0 (kind: PathSegmentSimple)
    │   │               │   │               └── ident (kind: TokenIdentifier): 'S'
    │   │               │   ├── separator #0 (kind: TokenComma): ','
    │   │               │   └── item #1 (kind: GenericArgUnnamed)
    │   │               │       └── value (kind: ExprPath)
    │   │               │           ├── dollar (kind: OptionTerminalDollarEmpty) []
    │   │               │           └── segments (kind: ExprPathInner)
    │   │               │               └── item #0 (kind: PathSegmentSimple)
    │   │               │                   └── ident (kind: TokenIdentifier): 'TEvent'
    │   │               └── rangle (kind: TokenGT): '>'
    │   └── type_constrains (kind: OptionAssociatedItemConstraintsEmpty) []
    ├── separator #1 (kind: TokenComma): ','
    └── item #2 (kind: GenericParamNegativeImpl)
        ├── minus (kind: TokenMinus): '-'
        └── trait_path (kind: ExprPath)
            ├── dollar (kind: OptionTerminalDollarEmpty) []
            └── segments (kind: ExprPathInner)
                ├── item #0 (kind: PathSegmentSimple)
                │   └── ident (kind: TokenIdentifier): 'traits'
                ├── separator #0 (kind: TokenColonColon): '::'
                └── item #1 (kind: PathSegmentWithGenericArgs)
                    ├── ident (kind: TokenIdentifier): 'Into'
                    ├── separator (kind: OptionTerminalColonColonEmpty) []
                    └── generic_args (kind: GenericArgs)
                        ├── langle (kind: TokenLT): '<'
                        ├── generic_args (kind: GenericArgList)
                        │   ├── item #0 (kind: GenericArgUnnamed)
                        │   │   └── value (kind: ExprPath)
                        │   │       ├── dollar (kind: OptionTerminalDollarEmpty) []
                        │   │       └── segments (kind: ExprPathInner)
                        │   │           └── item #0 (kind: PathSegmentSimple)
                        │   │               └── ident (kind: TokenIdentifier): 'S'
                        │   ├── separator #0 (kind: TokenComma): ','
                        │   └── item #1 (kind: GenericArgUnnamed)
                        │       └── value (kind: ExprPath)
                        │           ├── dollar (kind: OptionTerminalDollarEmpty) []
                        │           └── segments (kind: ExprPathInner)
                        │               └── item #0 (kind: PathSegmentSimple)
                        │                   └── ident (kind: TokenIdentifier): 'S'
                        └── rangle (kind: TokenGT): '>'