Enum lrpar::ParseRepair
source · pub enum ParseRepair<LexemeT: Lexeme<StorageT>, StorageT: Hash> {
Insert(TIdx<StorageT>),
Delete(LexemeT),
Shift(LexemeT),
}
Expand description
After a parse error is encountered, the parser attempts to find a way of recovering. Each entry
in the sequence of repairs is represented by a ParseRepair
.
Variants§
Insert(TIdx<StorageT>)
Insert a Symbol::Token
.
Delete(LexemeT)
Delete a symbol.
Shift(LexemeT)
Shift a symbol.
Trait Implementations§
source§impl<LexemeT: Clone + Lexeme<StorageT>, StorageT: Clone + Hash> Clone for ParseRepair<LexemeT, StorageT>
impl<LexemeT: Clone + Lexeme<StorageT>, StorageT: Clone + Hash> Clone for ParseRepair<LexemeT, StorageT>
source§fn clone(&self) -> ParseRepair<LexemeT, StorageT>
fn clone(&self) -> ParseRepair<LexemeT, StorageT>
Returns a copy 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 moresource§impl<LexemeT: Debug + Lexeme<StorageT>, StorageT: Debug + Hash> Debug for ParseRepair<LexemeT, StorageT>
impl<LexemeT: Debug + Lexeme<StorageT>, StorageT: Debug + Hash> Debug for ParseRepair<LexemeT, StorageT>
source§impl<LexemeT: Hash + Lexeme<StorageT>, StorageT: Hash + Hash> Hash for ParseRepair<LexemeT, StorageT>
impl<LexemeT: Hash + Lexeme<StorageT>, StorageT: Hash + Hash> Hash for ParseRepair<LexemeT, StorageT>
source§impl<LexemeT: PartialEq + Lexeme<StorageT>, StorageT: PartialEq + Hash> PartialEq for ParseRepair<LexemeT, StorageT>
impl<LexemeT: PartialEq + Lexeme<StorageT>, StorageT: PartialEq + Hash> PartialEq for ParseRepair<LexemeT, StorageT>
source§fn eq(&self, other: &ParseRepair<LexemeT, StorageT>) -> bool
fn eq(&self, other: &ParseRepair<LexemeT, StorageT>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl<LexemeT: Eq + Lexeme<StorageT>, StorageT: Eq + Hash> Eq for ParseRepair<LexemeT, StorageT>
impl<LexemeT: Lexeme<StorageT>, StorageT: Hash> StructuralPartialEq for ParseRepair<LexemeT, StorageT>
Auto Trait Implementations§
impl<LexemeT, StorageT> Freeze for ParseRepair<LexemeT, StorageT>
impl<LexemeT, StorageT> RefUnwindSafe for ParseRepair<LexemeT, StorageT>where
LexemeT: RefUnwindSafe,
StorageT: RefUnwindSafe,
impl<LexemeT, StorageT> Send for ParseRepair<LexemeT, StorageT>
impl<LexemeT, StorageT> Sync for ParseRepair<LexemeT, StorageT>
impl<LexemeT, StorageT> Unpin for ParseRepair<LexemeT, StorageT>
impl<LexemeT, StorageT> UnwindSafe for ParseRepair<LexemeT, StorageT>where
LexemeT: UnwindSafe,
StorageT: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.