Expand description
Shared formatted-string interpolation parsing.
This module is intentionally syntax-only. It extracts literal and
expression segments from f"..." strings so all consumers (compiler,
type checker, LSP) can run their normal expression pipelines on the
extracted {...} expressions.
Structs§
- Table
Format Spec - Typed table rendering configuration for interpolation.
Enums§
- Format
Alignment - Horizontal alignment for formatted output.
- Format
Color - Color hint for formatted output.
- Interpolation
Format Spec - Typed format specification for interpolation expressions.
- Interpolation
Part - A parsed segment of an interpolated string.
Functions§
- find_
top_ level_ format_ colon - Find the top-level format-separator
:in an interpolation expression. - has_
interpolation - Check whether a string contains at least one interpolation segment.
- has_
interpolation_ with_ mode - Check whether a string contains at least one interpolation segment for the mode.
- parse_
interpolation - Parse a formatted string payload into interpolation parts.
- parse_
interpolation_ with_ mode - Parse a formatted string payload into interpolation parts using the given mode.
- split_
expression_ and_ format_ spec - Split interpolation content
expr[:spec]at the top-level format separator.