Skip to main content

Module source_values

Module source_values 

Source
Expand description

The runtime’s reading of a value as a comprehension source: which values peel into elements, and how a string source strips into typed tokens. The grammar’s separator rule (source::split_string_comprehension) is the one both sides use.

Functions§

iteration_interior
The canonical “is this value peelable, and into what?” predicate (SRD-18f §4). Returns Some(interior) when v has an iteration interior — peeling it one level yields these elements — and None when v is an iteration scalar (relaxed wraps it; an explicit [v…] destructure errors).
strip_string_tokens
Split a string-comprehension source into its token values (SRD-18f §3.2). Separators are runs of comma, semicolon, and ASCII whitespace; every other character — notably : (k:v / a:b:c tuples), . (floats), - (negatives / hyphenated labels), / — stays inside the token. Each token is typed like a literal-list element (u64 / f64 / bool / else Str), so "1, 2, 3" yields numeric values and "a, b" yields strings.