---
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 {
        range: 0..95,
        body: [
            Match(
                StmtMatch {
                    range: 0..94,
                    subject: Name(
                        ExprName {
                            range: 6..13,
                            id: "subject",
                            ctx: Load,
                        },
                    ),
                    cases: [
                        MatchCase {
                            range: 19..30,
                            pattern: MatchAs(
                                PatternMatchAs {
                                    range: 24..25,
                                    pattern: None,
                                    name: Some(
                                        Identifier {
                                            id: "a",
                                            range: 24..25,
                                        },
                                    ),
                                },
                            ),
                            guard: None,
                            body: [
                                Expr(
                                    StmtExpr {
                                        range: 27..30,
                                        value: EllipsisLiteral(
                                            ExprEllipsisLiteral {
                                                range: 27..30,
                                            },
                                        ),
                                    },
                                ),
                            ],
                        },
                        MatchCase {
                            range: 35..51,
                            pattern: MatchAs(
                                PatternMatchAs {
                                    range: 40..41,
                                    pattern: None,
                                    name: Some(
                                        Identifier {
                                            id: "a",
                                            range: 40..41,
                                        },
                                    ),
                                },
                            ),
                            guard: Some(
                                Name(
                                    ExprName {
                                        range: 45..46,
                                        id: "x",
                                        ctx: Load,
                                    },
                                ),
                            ),
                            body: [
                                Expr(
                                    StmtExpr {
                                        range: 48..51,
                                        value: EllipsisLiteral(
                                            ExprEllipsisLiteral {
                                                range: 48..51,
                                            },
                                        ),
                                    },
                                ),
                            ],
                        },
                        MatchCase {
                            range: 56..70,
                            pattern: MatchSequence(
                                PatternMatchSequence {
                                    range: 61..65,
                                    patterns: [
                                        MatchAs(
                                            PatternMatchAs {
                                                range: 61..62,
                                                pattern: None,
                                                name: Some(
                                                    Identifier {
                                                        id: "a",
                                                        range: 61..62,
                                                    },
                                                ),
                                            },
                                        ),
                                        MatchAs(
                                            PatternMatchAs {
                                                range: 64..65,
                                                pattern: None,
                                                name: Some(
                                                    Identifier {
                                                        id: "b",
                                                        range: 64..65,
                                                    },
                                                ),
                                            },
                                        ),
                                    ],
                                },
                            ),
                            guard: None,
                            body: [
                                Expr(
                                    StmtExpr {
                                        range: 67..70,
                                        value: EllipsisLiteral(
                                            ExprEllipsisLiteral {
                                                range: 67..70,
                                            },
                                        ),
                                    },
                                ),
                            ],
                        },
                        MatchCase {
                            range: 75..94,
                            pattern: MatchSequence(
                                PatternMatchSequence {
                                    range: 80..84,
                                    patterns: [
                                        MatchAs(
                                            PatternMatchAs {
                                                range: 80..81,
                                                pattern: None,
                                                name: Some(
                                                    Identifier {
                                                        id: "a",
                                                        range: 80..81,
                                                    },
                                                ),
                                            },
                                        ),
                                        MatchAs(
                                            PatternMatchAs {
                                                range: 83..84,
                                                pattern: None,
                                                name: Some(
                                                    Identifier {
                                                        id: "b",
                                                        range: 83..84,
                                                    },
                                                ),
                                            },
                                        ),
                                    ],
                                },
                            ),
                            guard: Some(
                                Name(
                                    ExprName {
                                        range: 88..89,
                                        id: "x",
                                        ctx: Load,
                                    },
                                ),
                            ),
                            body: [
                                Expr(
                                    StmtExpr {
                                        range: 91..94,
                                        value: EllipsisLiteral(
                                            ExprEllipsisLiteral {
                                                range: 91..94,
                                            },
                                        ),
                                    },
                                ),
                            ],
                        },
                    ],
                },
            ),
        ],
    },
)
```
