pub enum MatchRecognizePattern {
Symbol {
symbol: Ident,
meta: Meta,
},
Start {
meta: Meta,
},
End {
meta: Meta,
},
Concat {
patterns: ThinVec<MatchRecognizePattern>,
meta: Meta,
},
Alternation {
patterns: ThinVec<MatchRecognizePattern>,
meta: Meta,
},
Group {
pattern: Box<MatchRecognizePattern>,
meta: Meta,
},
Exclude {
pattern: Box<MatchRecognizePattern>,
meta: Meta,
},
Permute {
patterns: ThinVec<MatchRecognizePattern>,
meta: Meta,
},
Repetition {
pattern: Box<MatchRecognizePattern>,
quantifier: RepetitionQuantifier,
meta: Meta,
},
}Expand description
The row-pattern regular expression inside PATTERN ( … ) — a recursive grammar of
pattern variables, anchors, grouping, alternation, concatenation, exclusion,
permutation, and quantifiers.
Non-generic in the extension parameter: a pattern references only variable names
(Ident) and structural operators, never an Expr. Every variant carries
meta, so the whole tree is addressable (ADR-0002); the recursion is bounded by
the parser’s shared depth guard.
Variants§
Symbol
A pattern variable reference (A, STRT).
Fields
Start
The partition-start anchor ^.
End
The partition-end anchor $.
Concat
A concatenation (sequence) a b c — matched in order.
Fields
patterns: ThinVec<MatchRecognizePattern>patterns in source order.
Alternation
An alternation a | b | c — matched as the first branch that succeeds.
Fields
patterns: ThinVec<MatchRecognizePattern>patterns in source order.
Group
A parenthesized group ( … ).
Fields
pattern: Box<MatchRecognizePattern>The grouped sub-pattern.
Exclude
An exclusion {- … -} — matched but omitted from ALL ROWS PER MATCH output.
Fields
pattern: Box<MatchRecognizePattern>The excluded sub-pattern.
Permute
PERMUTE ( p1, p2, … ) — matches the arguments in any order.
Fields
patterns: ThinVec<MatchRecognizePattern>patterns in source order.
Repetition
A quantified pattern p*, p+, p{2,3} — repeat pattern per quantifier.
Fields
pattern: Box<MatchRecognizePattern>The repeated sub-pattern.
quantifier: RepetitionQuantifierThe repetition count or range (*/+/?/{m,n}); see RepetitionQuantifier.
Trait Implementations§
Source§impl Clone for MatchRecognizePattern
impl Clone for MatchRecognizePattern
Source§fn clone(&self) -> MatchRecognizePattern
fn clone(&self) -> MatchRecognizePattern
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MatchRecognizePattern
impl Debug for MatchRecognizePattern
Source§impl<'de> Deserialize<'de> for MatchRecognizePattern
impl<'de> Deserialize<'de> for MatchRecognizePattern
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for MatchRecognizePattern
Source§impl Hash for MatchRecognizePattern
impl Hash for MatchRecognizePattern
Source§impl PartialEq for MatchRecognizePattern
impl PartialEq for MatchRecognizePattern
Source§impl Render for MatchRecognizePattern
impl Render for MatchRecognizePattern
Source§fn render(&self, ctx: &RenderCtx<'_>, f: &mut Formatter<'_>) -> Result
fn render(&self, ctx: &RenderCtx<'_>, f: &mut Formatter<'_>) -> Result
Source§fn operand_binding_power(&self) -> Option<BindingPower>
fn operand_binding_power(&self) -> Option<BindingPower>
None (the default) for a self-delimiting node — an atom, call, or
constructor — that never needs parentheses. Read moreSource§impl Serialize for MatchRecognizePattern
impl Serialize for MatchRecognizePattern
Source§impl Spanned for MatchRecognizePattern
impl Spanned for MatchRecognizePattern
impl StructuralPartialEq for MatchRecognizePattern
Auto Trait Implementations§
impl Freeze for MatchRecognizePattern
impl RefUnwindSafe for MatchRecognizePattern
impl Send for MatchRecognizePattern
impl Sync for MatchRecognizePattern
impl Unpin for MatchRecognizePattern
impl UnsafeUnpin for MatchRecognizePattern
impl UnwindSafe for MatchRecognizePattern
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> DynAstExt for T
impl<T> DynAstExt for T
Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&dyn Any for downcasting a node back to its concrete type.Source§fn dyn_clone(&self) -> Box<dyn DynAstExt>
fn dyn_clone(&self) -> Box<dyn DynAstExt>
Clone (whose
Self-returning signature cannot go through a vtable).Source§fn dyn_eq(&self, other: &dyn DynAstExt) -> bool
fn dyn_eq(&self, other: &dyn DynAstExt) -> bool
PartialEq (whose &Self argument cannot go through a vtable). Equal
iff other holds the same concrete type and that type deems the values
equal; differently-typed nodes are never equal.