pub enum AstNode {
AstGroup {
name: Option<String>,
inner: Box<Expr>,
},
Backref {
target: CaptureGroupTarget,
casei: bool,
relative_recursion_level: Option<isize>,
},
SubroutineCall(CaptureGroupTarget),
BackrefExistsCondition {
target: CaptureGroupTarget,
relative_recursion_level: Option<isize>,
},
}Expand description
Abstract Syntax Tree node - will be resolved into an Expr before analysis
Variants§
AstGroup
Group with optional name - name is only present if explicitly specified in pattern
Fields
Backref
Backreference
Fields
§
target: CaptureGroupTargetThe target capture group being referenced
SubroutineCall(CaptureGroupTarget)
Subroutine Call
BackrefExistsCondition
Backreference exists condition (?(name)...) or (?(1)...) - unresolved target.
The optional relative_recursion_level corresponds to the Oniguruma +N/-N suffix
(e.g. (?(name+0)...)) which qualifies which recursion level’s capture is tested.
Fields
§
target: CaptureGroupTargetThe target capture group being tested for existence
Trait Implementations§
impl Eq for AstNode
impl StructuralPartialEq for AstNode
Auto Trait Implementations§
impl Freeze for AstNode
impl RefUnwindSafe for AstNode
impl Send for AstNode
impl Sync for AstNode
impl Unpin for AstNode
impl UnsafeUnpin for AstNode
impl UnwindSafe for AstNode
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