---
source: crates/ruff_python_parser/tests/fixtures.rs
input_file: crates/ruff_python_parser/resources/inline/err/if_stmt_elif_missing_colon.py
snapshot_kind: text
---
## AST

```
Module(
    ModModule {
        range: 0..46,
        body: [
            If(
                StmtIf {
                    range: 0..45,
                    test: Name(
                        ExprName {
                            range: 3..4,
                            id: Name("x"),
                            ctx: Load,
                        },
                    ),
                    body: [
                        Pass(
                            StmtPass {
                                range: 10..14,
                            },
                        ),
                    ],
                    elif_else_clauses: [
                        ElifElseClause {
                            range: 15..30,
                            test: Some(
                                Name(
                                    ExprName {
                                        range: 20..21,
                                        id: Name("y"),
                                        ctx: Load,
                                    },
                                ),
                            ),
                            body: [
                                Pass(
                                    StmtPass {
                                        range: 26..30,
                                    },
                                ),
                            ],
                        },
                        ElifElseClause {
                            range: 31..45,
                            test: None,
                            body: [
                                Pass(
                                    StmtPass {
                                        range: 41..45,
                                    },
                                ),
                            ],
                        },
                    ],
                },
            ),
        ],
    },
)
```
## Errors

  |
1 | if x:
2 |     pass
3 | elif y
  |       ^ Syntax Error: Expected ':', found newline
4 |     pass
5 | else:
6 |     pass
  |
