pub struct Rule {
pub kind: SyntaxKind,
pub state: usize,
}Fields§
§kind: SyntaxKind§state: usizeImplementations§
Trait Implementations§
Source§impl ParserTrait for Rule
impl ParserTrait for Rule
type Kind = SyntaxKind
fn step(&self, element: &Element<Self>, state: &mut AStar<'_, Self>)
fn at(&self) -> usize
fn element_kind(&self) -> SyntaxKind
Source§fn state_dist(&self, terminal: &SyntaxKind) -> isize
fn state_dist(&self, terminal: &SyntaxKind) -> isize
Precomputed dist(q, a): minimum insertion cost to reach a point where
terminal
terminal can be matched, starting from this parser state
(kind, state_number). Default: 0 (always admissible).impl Copy for Rule
Auto Trait Implementations§
impl Freeze for Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnsafeUnpin for Rule
impl UnwindSafe for Rule
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