rustpython-ruff_python_parser 0.15.8

Unofficial fork for RustPython
Documentation
---
source: crates/ruff_python_parser/tests/fixtures.rs
input_file: crates/ruff_python_parser/resources/inline/ok/match_sequence_pattern_terminator.py
---
## AST

```
Module(
    ModModule {
        node_index: NodeIndex(None),
        range: 0..95,
        body: [
            Match(
                StmtMatch {
                    node_index: NodeIndex(None),
                    range: 0..94,
                    subject: Name(
                        ExprName {
                            node_index: NodeIndex(None),
                            range: 6..13,
                            id: Name("subject"),
                            ctx: Load,
                        },
                    ),
                    cases: [
                        MatchCase {
                            range: 19..35,
                            node_index: NodeIndex(None),
                            pattern: MatchAs(
                                PatternMatchAs {
                                    node_index: NodeIndex(None),
                                    range: 24..25,
                                    pattern: None,
                                    name: Some(
                                        Identifier {
                                            id: Name("a"),
                                            range: 24..25,
                                            node_index: NodeIndex(None),
                                        },
                                    ),
                                },
                            ),
                            guard: Some(
                                Name(
                                    ExprName {
                                        node_index: NodeIndex(None),
                                        range: 29..30,
                                        id: Name("x"),
                                        ctx: Load,
                                    },
                                ),
                            ),
                            body: [
                                Expr(
                                    StmtExpr {
                                        node_index: NodeIndex(None),
                                        range: 32..35,
                                        value: EllipsisLiteral(
                                            ExprEllipsisLiteral {
                                                node_index: NodeIndex(None),
                                                range: 32..35,
                                            },
                                        ),
                                    },
                                ),
                            ],
                        },
                        MatchCase {
                            range: 40..54,
                            node_index: NodeIndex(None),
                            pattern: MatchSequence(
                                PatternMatchSequence {
                                    node_index: NodeIndex(None),
                                    range: 45..49,
                                    patterns: [
                                        MatchAs(
                                            PatternMatchAs {
                                                node_index: NodeIndex(None),
                                                range: 45..46,
                                                pattern: None,
                                                name: Some(
                                                    Identifier {
                                                        id: Name("a"),
                                                        range: 45..46,
                                                        node_index: NodeIndex(None),
                                                    },
                                                ),
                                            },
                                        ),
                                        MatchAs(
                                            PatternMatchAs {
                                                node_index: NodeIndex(None),
                                                range: 48..49,
                                                pattern: None,
                                                name: Some(
                                                    Identifier {
                                                        id: Name("b"),
                                                        range: 48..49,
                                                        node_index: NodeIndex(None),
                                                    },
                                                ),
                                            },
                                        ),
                                    ],
                                },
                            ),
                            guard: None,
                            body: [
                                Expr(
                                    StmtExpr {
                                        node_index: NodeIndex(None),
                                        range: 51..54,
                                        value: EllipsisLiteral(
                                            ExprEllipsisLiteral {
                                                node_index: NodeIndex(None),
                                                range: 51..54,
                                            },
                                        ),
                                    },
                                ),
                            ],
                        },
                        MatchCase {
                            range: 59..78,
                            node_index: NodeIndex(None),
                            pattern: MatchSequence(
                                PatternMatchSequence {
                                    node_index: NodeIndex(None),
                                    range: 64..68,
                                    patterns: [
                                        MatchAs(
                                            PatternMatchAs {
                                                node_index: NodeIndex(None),
                                                range: 64..65,
                                                pattern: None,
                                                name: Some(
                                                    Identifier {
                                                        id: Name("a"),
                                                        range: 64..65,
                                                        node_index: NodeIndex(None),
                                                    },
                                                ),
                                            },
                                        ),
                                        MatchAs(
                                            PatternMatchAs {
                                                node_index: NodeIndex(None),
                                                range: 67..68,
                                                pattern: None,
                                                name: Some(
                                                    Identifier {
                                                        id: Name("b"),
                                                        range: 67..68,
                                                        node_index: NodeIndex(None),
                                                    },
                                                ),
                                            },
                                        ),
                                    ],
                                },
                            ),
                            guard: Some(
                                Name(
                                    ExprName {
                                        node_index: NodeIndex(None),
                                        range: 72..73,
                                        id: Name("x"),
                                        ctx: Load,
                                    },
                                ),
                            ),
                            body: [
                                Expr(
                                    StmtExpr {
                                        node_index: NodeIndex(None),
                                        range: 75..78,
                                        value: EllipsisLiteral(
                                            ExprEllipsisLiteral {
                                                node_index: NodeIndex(None),
                                                range: 75..78,
                                            },
                                        ),
                                    },
                                ),
                            ],
                        },
                        MatchCase {
                            range: 83..94,
                            node_index: NodeIndex(None),
                            pattern: MatchAs(
                                PatternMatchAs {
                                    node_index: NodeIndex(None),
                                    range: 88..89,
                                    pattern: None,
                                    name: Some(
                                        Identifier {
                                            id: Name("a"),
                                            range: 88..89,
                                            node_index: NodeIndex(None),
                                        },
                                    ),
                                },
                            ),
                            guard: None,
                            body: [
                                Expr(
                                    StmtExpr {
                                        node_index: NodeIndex(None),
                                        range: 91..94,
                                        value: EllipsisLiteral(
                                            ExprEllipsisLiteral {
                                                node_index: NodeIndex(None),
                                                range: 91..94,
                                            },
                                        ),
                                    },
                                ),
                            ],
                        },
                    ],
                },
            ),
        ],
    },
)
```