---
source: crates/ruff_python_parser/src/lexer.rs
expression: lex_source(source)
snapshot_kind: text
---
## Tokens
```
[
    (
        FStringStart,
        0..2,
        TokenFlags(
            F_STRING,
        ),
    ),
    (
        FStringMiddle(
            "\\",
        ),
        2..3,
        TokenFlags(
            F_STRING,
        ),
    ),
    (
        Lbrace,
        3..4,
    ),
    (
        Name(
            Name("foo"),
        ),
        4..7,
    ),
    (
        Rbrace,
        7..8,
    ),
    (
        FStringEnd,
        8..9,
        TokenFlags(
            F_STRING,
        ),
    ),
    (
        FStringStart,
        10..12,
        TokenFlags(
            F_STRING,
        ),
    ),
    (
        FStringMiddle(
            "\\\\",
        ),
        12..14,
        TokenFlags(
            F_STRING,
        ),
    ),
    (
        Lbrace,
        14..15,
    ),
    (
        Name(
            Name("foo"),
        ),
        15..18,
    ),
    (
        Rbrace,
        18..19,
    ),
    (
        FStringEnd,
        19..20,
        TokenFlags(
            F_STRING,
        ),
    ),
    (
        FStringStart,
        21..23,
        TokenFlags(
            F_STRING,
        ),
    ),
    (
        FStringMiddle(
            "\\{foo}",
        ),
        23..31,
        TokenFlags(
            F_STRING,
        ),
    ),
    (
        FStringEnd,
        31..32,
        TokenFlags(
            F_STRING,
        ),
    ),
    (
        FStringStart,
        33..35,
        TokenFlags(
            F_STRING,
        ),
    ),
    (
        FStringMiddle(
            "\\\\{foo}",
        ),
        35..44,
        TokenFlags(
            F_STRING,
        ),
    ),
    (
        FStringEnd,
        44..45,
        TokenFlags(
            F_STRING,
        ),
    ),
    (
        Newline,
        45..45,
    ),
]
```
