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

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

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


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