Enum SpanSource
pub enum SpanSource {
Slot(u32),
MetaRef(u32),
Known(Pos),
SelfBase,
}Expand description
One candidate in a pending endpoint walk, in lark’s _pp_get_meta order.
Variants§
Slot(u32)
An unfilled batching-callback slot: classify the drained host value at resolution (positioned/positionless Token or stamped Tree contribute; anything else skips).
MetaRef(u32)
A tree child whose own meta is unresolved — an index into the same
meta arena the owning Meta::Pending lives in.
Known(Pos)
Engine-resolved contributor; terminates the walk (later raw children cannot be reached by lark’s scan).
SelfBase
The owning node’s OWN prior meta — an expand1 (?rule) collapse whose
scan walked over the very node it is about to stamp (lark wraps
PropagatePositions outside ExpandSingleChild, so res_meta is first_meta). Resolves against the pending meta’s base, NOT the meta
arena: the arena slot is mid-overwrite, and reading it would look like a
dependency cycle.
Keeping it as a source — rather than deleting it — is what makes the WALK faithful: a non-empty base CONTRIBUTES and terminates the walk (lark stops at that child and self-assigns), while an empty base SKIPS and the walk continues to later raw children. Deleting it always continued, which silently took the endpoint from a later child lark can never reach.
Scope of “faithful”: this models lark’s _pp_get_meta WALK, not the
mutation ORDER of PropagatePositions.__call__, which applies the start
update before scanning the reversed children — so lark can observe (and,
on an empty base, crash on) a half-written res_meta. Both plans here
resolve against the same base. The only observable difference is that lark
raises AttributeError where we return the value its own algorithm
prescribes; deliberately not emulated (see dev/post-milestone-1.md).
Trait Implementations§
§impl Clone for SpanSource
impl Clone for SpanSource
§fn clone(&self) -> SpanSource
fn clone(&self) -> SpanSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more