pub struct CriticalPair {
pub overlap: TLExpr,
pub result1: TLExpr,
pub result2: TLExpr,
pub rule1_name: String,
pub rule2_name: String,
pub joinable: Option<bool>,
}Expand description
A critical pair representing a potential conflict between two rules.
Fields§
§overlap: TLExprThe expression where the overlap occurs
result1: TLExprResult of applying the first rule
result2: TLExprResult of applying the second rule
rule1_name: StringNames of the rules involved
rule2_name: String§joinable: Option<bool>Whether this critical pair is joinable
Implementations§
Source§impl CriticalPair
impl CriticalPair
Sourcepub fn new(
overlap: TLExpr,
result1: TLExpr,
result2: TLExpr,
rule1_name: String,
rule2_name: String,
) -> Self
pub fn new( overlap: TLExpr, result1: TLExpr, result2: TLExpr, rule1_name: String, rule2_name: String, ) -> Self
Create a new critical pair.
Sourcepub fn is_trivially_joinable(&self) -> bool
pub fn is_trivially_joinable(&self) -> bool
Check if this critical pair is trivially joinable (results are equal).
Sourcepub fn has_conflict(&self) -> bool
pub fn has_conflict(&self) -> bool
Check if the results are syntactically different.
Trait Implementations§
Source§impl Clone for CriticalPair
impl Clone for CriticalPair
Source§fn clone(&self) -> CriticalPair
fn clone(&self) -> CriticalPair
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CriticalPair
impl RefUnwindSafe for CriticalPair
impl Send for CriticalPair
impl Sync for CriticalPair
impl Unpin for CriticalPair
impl UnwindSafe for CriticalPair
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