---
source: crates/ruff_python_parser/tests/fixtures.rs
input_file: crates/ruff_python_parser/resources/invalid/re_lexing/triple_quoted_fstring_1.py
---
## AST

```
Module(
    ModModule {
        node_index: AtomicNodeIndex(..),
        range: 0..198,
        body: [
            Expr(
                StmtExpr {
                    node_index: AtomicNodeIndex(..),
                    range: 166..178,
                    value: FString(
                        ExprFString {
                            node_index: AtomicNodeIndex(..),
                            range: 166..178,
                            value: FStringValue {
                                inner: Single(
                                    FString(
                                        FString {
                                            range: 166..178,
                                            node_index: AtomicNodeIndex(..),
                                            elements: [
                                                Literal(
                                                    InterpolatedStringLiteralElement {
                                                        range: 170..176,
                                                        node_index: AtomicNodeIndex(..),
                                                        value: "hello ",
                                                    },
                                                ),
                                                Interpolation(
                                                    InterpolatedElement {
                                                        range: 176..178,
                                                        node_index: AtomicNodeIndex(..),
                                                        expression: Name(
                                                            ExprName {
                                                                node_index: AtomicNodeIndex(..),
                                                                range: 177..178,
                                                                id: Name("x"),
                                                                ctx: Load,
                                                            },
                                                        ),
                                                        debug_text: None,
                                                        conversion: None,
                                                        format_spec: None,
                                                    },
                                                ),
                                            ],
                                            flags: FStringFlags {
                                                quote_style: Double,
                                                prefix: Regular,
                                                triple_quoted: true,
                                            },
                                        },
                                    ),
                                ),
                            },
                        },
                    ),
                },
            ),
        ],
    },
)
```
## Errors

  |
3 |   # https://github.com/astral-sh/ruff/issues/11929
4 |
5 |   f"""hello {x # comment    
  |  ___________________________^
6 | | y = 1
  | |_____^ Syntax Error: f-string: unterminated triple-quoted string
  |


  |
5 | f"""hello {x # comment    
6 | y = 1
  | ^ Syntax Error: f-string: expecting '}'
  |


  |
3 |   # https://github.com/astral-sh/ruff/issues/11929
4 |
5 |   f"""hello {x # comment    
  |  ___________________________^
6 | | y = 1
  | |_____^ Syntax Error: Expected FStringEnd, found Unknown
  |


  |
5 | f"""hello {x # comment    
6 | y = 1
  |      ^ Syntax Error: Expected a statement
  |
