Struct lrpar::ParseError
source · pub struct ParseError<LexemeT: Lexeme<StorageT>, StorageT: Hash> { /* private fields */ }
Expand description
Records a single parse error.
Implementations§
source§impl<LexemeT: Lexeme<StorageT>, StorageT: Hash + PrimInt + Unsigned> ParseError<LexemeT, StorageT>
impl<LexemeT: Lexeme<StorageT>, StorageT: Hash + PrimInt + Unsigned> ParseError<LexemeT, StorageT>
sourcepub fn stidx(&self) -> StIdx<StorageT>
pub fn stidx(&self) -> StIdx<StorageT>
Return the state table index where this error was detected.
sourcepub fn repairs(&self) -> &Vec<Vec<ParseRepair<LexemeT, StorageT>>>
pub fn repairs(&self) -> &Vec<Vec<ParseRepair<LexemeT, StorageT>>>
Return the repairs found that would fix this error. Note that there are infinite number of possible repairs for any error, so this is by definition a (finite) subset.
Trait Implementations§
source§impl<LexemeT: Clone + Lexeme<StorageT>, StorageT: Clone + Hash> Clone for ParseError<LexemeT, StorageT>
impl<LexemeT: Clone + Lexeme<StorageT>, StorageT: Clone + Hash> Clone for ParseError<LexemeT, StorageT>
source§fn clone(&self) -> ParseError<LexemeT, StorageT>
fn clone(&self) -> ParseError<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 ParseError<LexemeT, StorageT>
impl<LexemeT: Debug + Lexeme<StorageT>, StorageT: Debug + Hash> Debug for ParseError<LexemeT, StorageT>
source§impl<LexemeT: Lexeme<StorageT>, StorageT: Debug + Hash> Display for ParseError<LexemeT, StorageT>
impl<LexemeT: Lexeme<StorageT>, StorageT: Debug + Hash> Display for ParseError<LexemeT, StorageT>
source§impl<LexemeT: Lexeme<StorageT>, StorageT: Debug + Hash> Error for ParseError<LexemeT, StorageT>
impl<LexemeT: Lexeme<StorageT>, StorageT: Debug + Hash> Error for ParseError<LexemeT, StorageT>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl<StorageT: 'static + Debug + Hash + PrimInt + Unsigned, LexerTypesT: LexerTypes<StorageT = StorageT>> From<ParseError<<LexerTypesT as LexerTypes>::LexemeT, StorageT>> for LexParseError<StorageT, LexerTypesT>where
usize: AsPrimitive<StorageT>,
impl<StorageT: 'static + Debug + Hash + PrimInt + Unsigned, LexerTypesT: LexerTypes<StorageT = StorageT>> From<ParseError<<LexerTypesT as LexerTypes>::LexemeT, StorageT>> for LexParseError<StorageT, LexerTypesT>where
usize: AsPrimitive<StorageT>,
source§fn from(
err: ParseError<LexerTypesT::LexemeT, StorageT>,
) -> LexParseError<StorageT, LexerTypesT>
fn from( err: ParseError<LexerTypesT::LexemeT, StorageT>, ) -> LexParseError<StorageT, LexerTypesT>
Converts to this type from the input type.
source§impl<LexemeT: PartialEq + Lexeme<StorageT>, StorageT: PartialEq + Hash> PartialEq for ParseError<LexemeT, StorageT>
impl<LexemeT: PartialEq + Lexeme<StorageT>, StorageT: PartialEq + Hash> PartialEq for ParseError<LexemeT, StorageT>
source§fn eq(&self, other: &ParseError<LexemeT, StorageT>) -> bool
fn eq(&self, other: &ParseError<LexemeT, StorageT>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl<LexemeT: Lexeme<StorageT>, StorageT: Hash> StructuralPartialEq for ParseError<LexemeT, StorageT>
Auto Trait Implementations§
impl<LexemeT, StorageT> Freeze for ParseError<LexemeT, StorageT>
impl<LexemeT, StorageT> RefUnwindSafe for ParseError<LexemeT, StorageT>where
LexemeT: RefUnwindSafe,
StorageT: RefUnwindSafe,
impl<LexemeT, StorageT> Send for ParseError<LexemeT, StorageT>
impl<LexemeT, StorageT> Sync for ParseError<LexemeT, StorageT>
impl<LexemeT, StorageT> Unpin for ParseError<LexemeT, StorageT>
impl<LexemeT, StorageT> UnwindSafe for ParseError<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
)