Struct erg_parser::error::LexError
source · pub struct LexError(/* private fields */);
Implementations§
source§impl LexError
impl LexError
pub fn new(core: ErrorCore) -> Self
pub fn set_hint<S: Into<String>>(&mut self, hint: S)
pub fn compiler_bug( errno: usize, loc: Location, fn_name: &str, line: u32, ) -> Self
pub fn feature_error(errno: usize, loc: Location, name: &str) -> Self
pub fn invalid_none_match( errno: usize, loc: Location, fn_name: &str, line: u32, ) -> Self
pub fn failed_to_analyze_block(errno: usize, loc: Location) -> LexError
pub fn unexpected_token_error( errno: usize, loc: Location, found: &str, ) -> ParseError
pub fn simple_syntax_error(errno: usize, loc: Location) -> Self
pub fn expect_next_line_error(errno: usize, loc: Location, caused: &str) -> Self
pub fn syntax_error<S: Into<String>>( errno: usize, loc: Location, desc: S, hint: Option<String>, ) -> Self
pub fn unexpected_token<S: Display>( errno: usize, loc: Location, expected: S, got: TokenKind, ) -> Self
pub fn invalid_chunk_error(errno: usize, loc: Location) -> LexError
pub fn syntax_warning<S: Into<String>>( errno: usize, loc: Location, desc: S, hint: Option<String>, ) -> Self
pub fn invalid_definition_of_last_block(errno: usize, loc: Location) -> LexError
pub fn invalid_token_error( errno: usize, loc: Location, main_msg: &str, expect: &str, found: &str, ) -> LexError
pub fn invalid_seq_elems_error<S: Display>( errno: usize, loc: Location, expected: &[S], got: TokenKind, ) -> LexError
pub fn invalid_record_element_err(errno: usize, loc: Location) -> LexError
pub fn invalid_data_pack_definition( errno: usize, loc: Location, fnd: &str, ) -> ParseError
pub fn expect_keyword(errno: usize, loc: Location) -> ParseError
pub fn invalid_non_default_parameter(errno: usize, loc: Location) -> ParseError
pub fn invalid_colon_style(errno: usize, loc: Location) -> ParseError
pub fn unclosed_error( errno: usize, loc: Location, closer: &str, ty: &str, ) -> ParseError
pub fn expect_method_error(errno: usize, loc: Location) -> ParseError
pub fn expect_accessor(errno: usize, loc: Location) -> ParseError
pub fn invalid_acc_chain(errno: usize, loc: Location, found: &str) -> ParseError
pub fn expect_type_specified(errno: usize, loc: Location) -> ParseError
pub fn duplicate_elem_warning(errno: usize, loc: Location, elem: String) -> Self
Trait Implementations§
source§impl Error for LexError
impl Error for LexError
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 From<ParserRunnerError> for LexError
impl From<ParserRunnerError> for LexError
source§fn from(err: ParserRunnerError) -> Self
fn from(err: ParserRunnerError) -> Self
Converts to this type from the input type.
source§impl FromIterator<LexError> for LexErrors
impl FromIterator<LexError> for LexErrors
source§impl Stream<LexError> for LexErrors
impl Stream<LexError> for LexErrors
fn payload(self) -> Vec<LexError>
fn ref_payload(&self) -> &Vec<LexError>
fn ref_mut_payload(&mut self) -> &mut Vec<LexError>
fn clear(&mut self)
fn len(&self) -> usize
fn size(&self) -> usize
fn is_empty(&self) -> bool
fn insert(&mut self, idx: usize, elem: T)
fn remove(&mut self, idx: usize) -> T
fn push(&mut self, elem: T)
fn append<S>(&mut self, s: &mut S)where
S: Stream<T>,
fn pop(&mut self) -> Option<T>
fn lpop(&mut self) -> Option<T>
fn get(&self, idx: usize) -> Option<&T>
fn get_mut(&mut self, idx: usize) -> Option<&mut T>
fn first(&self) -> Option<&T>
fn first_mut(&mut self) -> Option<&mut T>
fn last(&self) -> Option<&T>
fn last_mut(&mut self) -> Option<&mut T>
fn iter(&self) -> Iter<'_, T>
fn iter_mut(&mut self) -> IterMut<'_, T>
fn take_all(&mut self) -> Vec<T>
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = T>,
fn split_off(&mut self, at: usize) -> Vec<T>
source§fn retain(&mut self, f: impl FnMut(&T) -> bool)
fn retain(&mut self, f: impl FnMut(&T) -> bool)
Remove all elements that don’t satisfy the predicate.
fn concat(self, other: Self) -> Self
Auto Trait Implementations§
impl Freeze for LexError
impl RefUnwindSafe for LexError
impl Send for LexError
impl Sync for LexError
impl Unpin for LexError
impl UnwindSafe for LexError
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