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

```
Module(
    ModModule {
        node_index: AtomicNodeIndex(..),
        range: 0..20,
        body: [
            For(
                StmtFor {
                    node_index: AtomicNodeIndex(..),
                    range: 0..19,
                    is_async: false,
                    target: Name(
                        ExprName {
                            node_index: AtomicNodeIndex(..),
                            range: 4..5,
                            id: Name("x"),
                            ctx: Store,
                        },
                    ),
                    iter: Name(
                        ExprName {
                            node_index: AtomicNodeIndex(..),
                            range: 8..8,
                            id: Name(""),
                            ctx: Invalid,
                        },
                    ),
                    body: [
                        Assign(
                            StmtAssign {
                                node_index: AtomicNodeIndex(..),
                                range: 14..19,
                                targets: [
                                    Name(
                                        ExprName {
                                            node_index: AtomicNodeIndex(..),
                                            range: 14..15,
                                            id: Name("a"),
                                            ctx: Store,
                                        },
                                    ),
                                ],
                                value: NumberLiteral(
                                    ExprNumberLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 18..19,
                                        value: Int(
                                            1,
                                        ),
                                    },
                                ),
                            },
                        ),
                    ],
                    orelse: [],
                },
            ),
        ],
    },
)
```
## Errors

  |
1 | for x in:
  |         ^ Syntax Error: Expected an expression
2 |     a = 1
  |
