Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Provisional API: This reference documents current compiler behavior. Compatibility is not yet promised.

src/components/interpolation.x

Interpolated Strings.

Functions

FunctionSummary
interpolation_loweringJoins an interpolated String’s parts.

Functions

interpolation_lowering

meta Code interpolation_lowering(Code code)

Joins an interpolated String’s parts.

Source: src/components/interpolation.x:14

Design notes

A %"..." literal reaches its rule as the segments form, each part already a String: cached text, a converted $ insertion, or raw text that constructed syntax spells. The rule joins the parts with String.join over a List chain of them, which the compiler boxes and evaluates once each, left to right.