pub enum IrNode<S, E> {
Symbol(S),
Any,
Concat(Vec<Self>),
Alternation(Vec<Self>),
Repeat {
node: Box<Self>,
bounds: RepeatBounds,
greedy: bool,
},
Group(Box<Self>),
Capture {
id: CaptureId,
node: Box<Self>,
},
Anchor(Anchor),
Assertion(AssertionId),
Extension(E),
}Expand description
One structured pattern expression.
Variants§
Symbol(S)
Match one exact symbol.
Any
Match any one symbol.
Concat(Vec<Self>)
Match every child in order.
Alternation(Vec<Self>)
Try each child as an alternative.
Repeat
Repeat a child within validated bounds.
Fields
§
bounds: RepeatBoundsValidated repetition bounds.
Group(Box<Self>)
Preserve explicit grouping from the source dialect.
Capture
Record the child’s subject span under a stable tag.
Anchor(Anchor)
Test a zero-width subject boundary.
Assertion(AssertionId)
Evaluate a separately declared zero-width assertion.
Extension(E)
A dialect-specific operation explicitly admitted by the target engine.
Trait Implementations§
impl<S: Eq, E: Eq> Eq for IrNode<S, E>
impl<S: PartialEq, E: PartialEq> StructuralPartialEq for IrNode<S, E>
Auto Trait Implementations§
impl<S, E> Freeze for IrNode<S, E>
impl<S, E> RefUnwindSafe for IrNode<S, E>where
S: RefUnwindSafe,
E: RefUnwindSafe,
impl<S, E> Send for IrNode<S, E>
impl<S, E> Sync for IrNode<S, E>
impl<S, E> Unpin for IrNode<S, E>
impl<S, E> UnsafeUnpin for IrNode<S, E>where
S: UnsafeUnpin,
E: UnsafeUnpin,
impl<S, E> UnwindSafe for IrNode<S, E>where
S: UnwindSafe,
E: UnwindSafe,
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