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

```
Module(
    ModModule {
        node_index: NodeIndex(None),
        range: 0..58,
        body: [
            Expr(
                StmtExpr {
                    node_index: NodeIndex(None),
                    range: 0..26,
                    value: FString(
                        ExprFString {
                            node_index: NodeIndex(None),
                            range: 0..26,
                            value: FStringValue {
                                inner: Single(
                                    FString(
                                        FString {
                                            range: 0..26,
                                            node_index: NodeIndex(None),
                                            elements: [
                                                Literal(
                                                    InterpolatedStringLiteralElement {
                                                        range: 2..25,
                                                        node_index: NodeIndex(None),
                                                        value: "",
                                                    },
                                                ),
                                            ],
                                            flags: FStringFlags {
                                                quote_style: Single,
                                                prefix: Regular,
                                                triple_quoted: false,
                                                unclosed: false,
                                            },
                                        },
                                    ),
                                ),
                            },
                        },
                    ),
                },
            ),
            Expr(
                StmtExpr {
                    node_index: NodeIndex(None),
                    range: 27..57,
                    value: FString(
                        ExprFString {
                            node_index: NodeIndex(None),
                            range: 27..57,
                            value: FStringValue {
                                inner: Single(
                                    FString(
                                        FString {
                                            range: 27..57,
                                            node_index: NodeIndex(None),
                                            elements: [
                                                Literal(
                                                    InterpolatedStringLiteralElement {
                                                        range: 31..54,
                                                        node_index: NodeIndex(None),
                                                        value: "",
                                                    },
                                                ),
                                            ],
                                            flags: FStringFlags {
                                                quote_style: Double,
                                                prefix: Regular,
                                                triple_quoted: true,
                                                unclosed: false,
                                            },
                                        },
                                    ),
                                ),
                            },
                        },
                    ),
                },
            ),
        ],
    },
)
```
## Errors

  |
1 | f'hello \N{INVALID} world'
  |            ^^^^^^^ Syntax Error: Got unexpected unicode
2 | f"""hello \N{INVALID} world"""
  |


  |
1 | f'hello \N{INVALID} world'
2 | f"""hello \N{INVALID} world"""
  |              ^^^^^^^ Syntax Error: Got unexpected unicode
  |