#[non_exhaustive]pub enum RecoveryKind {
CPCTPlus,
None,
}
Expand description
What recovery algorithm should be used when a syntax error is encountered?
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
CPCTPlus
The CPCT+ algorithm from Diekmann/Tratt “Don’t Panic! Better, Fewer, Syntax Errors for LR Parsers”.
None
Don’t use error recovery: return as soon as the first syntax error is encountered.
Trait Implementations§
Source§impl Clone for RecoveryKind
impl Clone for RecoveryKind
Source§fn clone(&self) -> RecoveryKind
fn clone(&self) -> RecoveryKind
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 Debug for RecoveryKind
impl Debug for RecoveryKind
Source§impl ToTokens for RecoveryKind
impl ToTokens for RecoveryKind
Source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
impl Copy for RecoveryKind
Auto Trait Implementations§
impl Freeze for RecoveryKind
impl RefUnwindSafe for RecoveryKind
impl Send for RecoveryKind
impl Sync for RecoveryKind
impl Unpin for RecoveryKind
impl UnwindSafe for RecoveryKind
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§impl<T> Spanned for Twhere
T: Spanned + ?Sized,
impl<T> Spanned for Twhere
T: Spanned + ?Sized,
Source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty.