---
source: crates/ruff_python_parser/src/lexer.rs
expression: lex_source(source)
snapshot_kind: text
---
## Tokens
```
[
    (
        FStringStart,
        0..2,
        TokenFlags(
            DOUBLE_QUOTES | F_STRING,
        ),
    ),
    (
        Lbrace,
        2..3,
    ),
    (
        Name(
            Name("x"),
        ),
        3..4,
    ),
    (
        Exclamation,
        4..5,
    ),
    (
        Name(
            Name("s"),
        ),
        5..6,
    ),
    (
        Rbrace,
        6..7,
    ),
    (
        FStringMiddle(
            " ",
        ),
        7..8,
        TokenFlags(
            DOUBLE_QUOTES | F_STRING,
        ),
    ),
    (
        Lbrace,
        8..9,
    ),
    (
        Name(
            Name("x"),
        ),
        9..10,
    ),
    (
        Equal,
        10..11,
    ),
    (
        Exclamation,
        11..12,
    ),
    (
        Name(
            Name("r"),
        ),
        12..13,
    ),
    (
        Rbrace,
        13..14,
    ),
    (
        FStringMiddle(
            " ",
        ),
        14..15,
        TokenFlags(
            DOUBLE_QUOTES | F_STRING,
        ),
    ),
    (
        Lbrace,
        15..16,
    ),
    (
        Name(
            Name("x"),
        ),
        16..17,
    ),
    (
        Colon,
        17..18,
    ),
    (
        FStringMiddle(
            ".3f!r",
        ),
        18..23,
        TokenFlags(
            DOUBLE_QUOTES | F_STRING,
        ),
    ),
    (
        Rbrace,
        23..24,
    ),
    (
        FStringMiddle(
            " {x!r}",
        ),
        24..32,
        TokenFlags(
            DOUBLE_QUOTES | F_STRING,
        ),
    ),
    (
        FStringEnd,
        32..33,
        TokenFlags(
            DOUBLE_QUOTES | F_STRING,
        ),
    ),
    (
        Newline,
        33..33,
    ),
]
```
