Skip to main content

Module string_interpolation

Module string_interpolation 

Source
Expand description

Compile-time string interpolation compilation.

Interpolation syntax parsing itself lives in shape-ast so compiler, type inference, and LSP all use the same parser.

Functions§

has_content_style_spec
R8 W4 W18.4: presence-test for any ContentStyle arm in a parsed f-string. Drives the D1 syntax-determined string → content flip: if any interpolation part carries a content-styling spec, the whole f-string lowers through the ContentNode::Fragment path and the inference engine reports content as the return type.
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.