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

```
Module(
    ModModule {
        range: 0..47,
        body: [
            Expr(
                StmtExpr {
                    range: 0..7,
                    value: StringLiteral(
                        ExprStringLiteral {
                            range: 0..7,
                            value: StringLiteralValue {
                                inner: Single(
                                    StringLiteral {
                                        range: 0..7,
                                        value: "hello",
                                        flags: StringLiteralFlags {
                                            quote_style: Single,
                                            prefix: Empty,
                                            triple_quoted: false,
                                        },
                                    },
                                ),
                            },
                        },
                    ),
                },
            ),
            Expr(
                StmtExpr {
                    range: 15..20,
                    value: BinOp(
                        ExprBinOp {
                            range: 15..20,
                            left: NumberLiteral(
                                ExprNumberLiteral {
                                    range: 15..16,
                                    value: Int(
                                        1,
                                    ),
                                },
                            ),
                            op: Add,
                            right: NumberLiteral(
                                ExprNumberLiteral {
                                    range: 19..20,
                                    value: Int(
                                        1,
                                    ),
                                },
                            ),
                        },
                    ),
                },
            ),
            Expr(
                StmtExpr {
                    range: 21..40,
                    value: FString(
                        ExprFString {
                            range: 21..40,
                            value: FStringValue {
                                inner: Concatenated(
                                    [
                                        Literal(
                                            StringLiteral {
                                                range: 21..28,
                                                value: "hello",
                                                flags: StringLiteralFlags {
                                                    quote_style: Single,
                                                    prefix: Empty,
                                                    triple_quoted: false,
                                                },
                                            },
                                        ),
                                        FString(
                                            FString {
                                                range: 29..40,
                                                elements: [
                                                    Literal(
                                                        FStringLiteralElement {
                                                            range: 31..37,
                                                            value: "world ",
                                                        },
                                                    ),
                                                    Expression(
                                                        FStringExpressionElement {
                                                            range: 37..40,
                                                            expression: Name(
                                                                ExprName {
                                                                    range: 38..39,
                                                                    id: "x",
                                                                    ctx: Load,
                                                                },
                                                            ),
                                                            debug_text: None,
                                                            conversion: None,
                                                            format_spec: None,
                                                        },
                                                    ),
                                                ],
                                                flags: FStringFlags {
                                                    quote_style: Single,
                                                    prefix: Regular,
                                                    triple_quoted: false,
                                                },
                                            },
                                        ),
                                    ],
                                ),
                            },
                        },
                    ),
                },
            ),
            Expr(
                StmtExpr {
                    range: 41..46,
                    value: BinOp(
                        ExprBinOp {
                            range: 41..46,
                            left: NumberLiteral(
                                ExprNumberLiteral {
                                    range: 41..42,
                                    value: Int(
                                        2,
                                    ),
                                },
                            ),
                            op: Add,
                            right: NumberLiteral(
                                ExprNumberLiteral {
                                    range: 45..46,
                                    value: Int(
                                        2,
                                    ),
                                },
                            ),
                        },
                    ),
                },
            ),
        ],
    },
)
```
## Errors

  |
1 |   'hello' 'world
  |  _________^
2 | | 1 + 1
  | |_^ Syntax Error: missing closing quote in string literal
3 |   'hello' f'world {x}
4 |   2 + 2
  |


  |
1 | 'hello' 'world
2 | 1 + 1
3 | 'hello' f'world {x}
  |                     Syntax Error: f-string: unterminated string
4 | 2 + 2
  |
