Struct RuleShape
pub struct RuleShape {
pub display_id: DisplayId,
pub expand1_inline: bool,
pub to_include: Vec<WalkEntry>,
pub append_nones: usize,
pub produces_splice: bool,
}Expand description
Per-rule reduce-time instructions — one shared build_rule_shape is the
tree-shaping contract both engines reuse (the POC’s
duplicate copy is a named drop). Mirrors Lark’s maybe_create_child_filter
_should_expandcomposition.
Fields§
§display_id: DisplayId§expand1_inline: bool?rule with no alias: a 1-child result is returned unwrapped
(Lark’s ExpandSingleChild).
to_include: Vec<WalkEntry>The child-filter walk, one [WalkEntry] per kept position.
append_nones: usizePlaceholders appended after the last entry.
produces_splice: boolThe rule’s own origin is _-transparent: its reduce yields a splice,
drained by the parent (LALR-private representation detail).
Trait Implementations§
impl Eq for RuleShape
impl StructuralPartialEq for RuleShape
Auto Trait Implementations§
impl Freeze for RuleShape
impl RefUnwindSafe for RuleShape
impl Send for RuleShape
impl Sync for RuleShape
impl Unpin for RuleShape
impl UnsafeUnpin for RuleShape
impl UnwindSafe for RuleShape
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more