Skip to main content

strip_complement

Function strip_complement 

Source
pub fn strip_complement(schema: &mut Schema)
Expand description

Strip byte-position constraints from a schema.

Removes start-byte, end-byte, and interstitial-* constraints — the byte-positional portion of the layout fibre that emit_pretty cannot reconstruct (the parser invents fresh positions). chose-alt-* discriminators are preserved because they’re the categorical witness of which CHOICE alternative the parser took and emit_pretty consumes them directly to dispatch without re-deriving the choice. This is the EmitParse law’s “complement” projection — distinct from Schema::forget_layout, which strips every layout-fibre sort including chose-alt-* to produce a truly abstract schema for the parse/decorate/emit lens.