pub struct Recursion<'a> { /* private fields */ }Expand description
Calculation of parts of grammar that participate in recursion, be it left-recursion, right-recursion or middle-recursion.
Implementations§
Source§impl<'a> Recursion<'a>
impl<'a> Recursion<'a>
Sourcepub fn minimal_distances<'b>(
&'b self,
) -> impl Iterator<Item = RecursiveRule<'b>>
pub fn minimal_distances<'b>( &'b self, ) -> impl Iterator<Item = RecursiveRule<'b>>
Makes an iterator over rules with information about the distance to the closest recursion on the RHS.
The distance is Symmetric, meaning it goes both forwards
and backwars.
Sourcepub fn recursive_rules<'b>(&'b self) -> impl Iterator<Item = RecursiveRule<'b>>
pub fn recursive_rules<'b>(&'b self) -> impl Iterator<Item = RecursiveRule<'b>>
Makes an iterator over recursive rules and information about their recursion.
Auto Trait Implementations§
impl<'a> Freeze for Recursion<'a>
impl<'a> !RefUnwindSafe for Recursion<'a>
impl<'a> !Send for Recursion<'a>
impl<'a> !Sync for Recursion<'a>
impl<'a> Unpin for Recursion<'a>
impl<'a> !UnwindSafe for Recursion<'a>
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