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/err/match_stmt_expected_case_block.py
---
## AST

```
Module(
    ModModule {
        node_index: NodeIndex(None),
        range: 0..61,
        body: [
            Match(
                StmtMatch {
                    node_index: NodeIndex(None),
                    range: 0..13,
                    subject: Name(
                        ExprName {
                            node_index: NodeIndex(None),
                            range: 6..7,
                            id: Name("x"),
                            ctx: Load,
                        },
                    ),
                    cases: [],
                },
            ),
            Assign(
                StmtAssign {
                    node_index: NodeIndex(None),
                    range: 13..18,
                    targets: [
                        Name(
                            ExprName {
                                node_index: NodeIndex(None),
                                range: 13..14,
                                id: Name("x"),
                                ctx: Store,
                            },
                        ),
                    ],
                    value: NumberLiteral(
                        ExprNumberLiteral {
                            node_index: NodeIndex(None),
                            range: 17..18,
                            value: Int(
                                1,
                            ),
                        },
                    ),
                },
            ),
            Match(
                StmtMatch {
                    node_index: NodeIndex(None),
                    range: 19..32,
                    subject: Name(
                        ExprName {
                            node_index: NodeIndex(None),
                            range: 25..26,
                            id: Name("x"),
                            ctx: Load,
                        },
                    ),
                    cases: [],
                },
            ),
            Match(
                StmtMatch {
                    node_index: NodeIndex(None),
                    range: 32..60,
                    subject: Name(
                        ExprName {
                            node_index: NodeIndex(None),
                            range: 38..39,
                            id: Name("y"),
                            ctx: Load,
                        },
                    ),
                    cases: [
                        MatchCase {
                            range: 49..60,
                            node_index: NodeIndex(None),
                            pattern: MatchAs(
                                PatternMatchAs {
                                    node_index: NodeIndex(None),
                                    range: 54..55,
                                    pattern: None,
                                    name: None,
                                },
                            ),
                            guard: None,
                            body: [
                                Expr(
                                    StmtExpr {
                                        node_index: NodeIndex(None),
                                        range: 57..60,
                                        value: EllipsisLiteral(
                                            ExprEllipsisLiteral {
                                                node_index: NodeIndex(None),
                                                range: 57..60,
                                            },
                                        ),
                                    },
                                ),
                            ],
                        },
                    ],
                },
            ),
        ],
    },
)
```
## Errors

  |
1 | match x:
2 |     x = 1
  |     ^ Syntax Error: Expected `case` block
3 | match x:
4 |     match y:
  |


  |
1 | match x:
2 |     x = 1
  |          ^ Syntax Error: Expected a statement
3 | match x:
4 |     match y:
5 |         case _: ...
  |


  |
2 |     x = 1
3 | match x:
4 |     match y:
  |     ^^^^^ Syntax Error: Expected `case` block
5 |         case _: ...
  |


  |
4 |     match y:
5 |         case _: ...
  |                    ^ Syntax Error: Expected a statement
  |