Skip to main content

Module span

Module span 

Source
Expand description

Source-byte spans for splice reflow.

Native parsers record half-open [start, end) ranges into the original input. Structure, blank, and code regions are those slices; only prose (and a configured code-comment body) is rewritten. Output is assembled by copying the gaps between rewrite ranges.

Structs§

ByteSpan
Half-open byte range [start, end) into the parser input.
CodeSpans
Header/body/footer spans of a Region::Code.
Line
One physical line of input, with byte offsets.
SpannedRegion
A classified region plus the parser-recorded source origin, if any.

Enums§

RegionOrigin
Origin recorded by a parser for one Region.

Functions§

flush_prose_spanned
Flush accumulated prose into the region list.
iter_lines
Split input into lines the way str::lines does, but keep offsets.
push_prose_line
Append a physical line to the running prose buffer and extend its span.