Struct rustpython_parser::lexer::LexicalError
source · pub struct LexicalError {
pub error: LexicalErrorType,
pub location: TextSize,
}
Expand description
Represents an error that occur during lexing and are
returned by the parse_*
functions in the iterator in the
lexer implementation.
Fields§
§error: LexicalErrorType
The type of error that occurred.
location: TextSize
The location of the error.
Implementations§
source§impl LexicalError
impl LexicalError
sourcepub fn new(error: LexicalErrorType, location: TextSize) -> Self
pub fn new(error: LexicalErrorType, location: TextSize) -> Self
Creates a new LexicalError
with the given error type and location.
Trait Implementations§
source§impl Debug for LexicalError
impl Debug for LexicalError
source§impl PartialEq<LexicalError> for LexicalError
impl PartialEq<LexicalError> for LexicalError
source§fn eq(&self, other: &LexicalError) -> bool
fn eq(&self, other: &LexicalError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for LexicalError
Auto Trait Implementations§
impl RefUnwindSafe for LexicalError
impl Send for LexicalError
impl Sync for LexicalError
impl Unpin for LexicalError
impl UnwindSafe for LexicalError
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