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

```
Module(
    ModModule {
        node_index: NodeIndex(None),
        range: 0..47,
        body: [
            If(
                StmtIf {
                    node_index: NodeIndex(None),
                    range: 0..17,
                    test: BooleanLiteral(
                        ExprBooleanLiteral {
                            node_index: NodeIndex(None),
                            range: 3..7,
                            value: true,
                        },
                    ),
                    body: [
                        Pass(
                            StmtPass {
                                node_index: NodeIndex(None),
                                range: 13..17,
                            },
                        ),
                    ],
                    elif_else_clauses: [],
                },
            ),
            AnnAssign(
                StmtAnnAssign {
                    node_index: NodeIndex(None),
                    range: 18..22,
                    target: Name(
                        ExprName {
                            node_index: NodeIndex(None),
                            range: 18..21,
                            id: Name("elf"),
                            ctx: Store,
                        },
                    ),
                    annotation: Name(
                        ExprName {
                            node_index: NodeIndex(None),
                            range: 22..22,
                            id: Name(""),
                            ctx: Invalid,
                        },
                    ),
                    value: None,
                    simple: true,
                },
            ),
            Pass(
                StmtPass {
                    node_index: NodeIndex(None),
                    range: 27..31,
                },
            ),
            Pass(
                StmtPass {
                    node_index: NodeIndex(None),
                    range: 42..46,
                },
            ),
        ],
    },
)
```
## Errors

  |
1 | if True:
2 |     pass
3 | elf:
  |     ^ Syntax Error: Expected an expression
4 |     pass
5 | else:
6 |     pass
  |


  |
2 |     pass
3 | elf:
4 |     pass
  | ^^^^ Syntax Error: Unexpected indentation
5 | else:
6 |     pass
  |


  |
3 | elf:
4 |     pass
  |         ^ Syntax Error: Expected a statement
5 | else:
6 |     pass
  |


  |
3 | elf:
4 |     pass
5 | else:
  |     ^ Syntax Error: Expected a statement
6 |     pass
  |


  |
3 | elf:
4 |     pass
5 | else:
  |      ^ Syntax Error: Expected a statement
6 |     pass
  |


  |
4 |     pass
5 | else:
6 |     pass
  | ^^^^ Syntax Error: Unexpected indentation
  |


  |
5 | else:
6 |     pass
  |         ^ Syntax Error: Expected a statement
  |