pub struct SkipWhitespaceRule;Expand description
A lexer rule that skips whitespace characters.
Trait Implementations§
Source§impl<'a, T> LexerRule<'a, T> for SkipWhitespaceRule
impl<'a, T> LexerRule<'a, T> for SkipWhitespaceRule
Source§fn get_token(
&self,
lexer: &mut Lexer<'a, T>,
) -> Result<Option<Token<T>>, Error<'_>>
fn get_token( &self, lexer: &mut Lexer<'a, T>, ) -> Result<Option<Token<T>>, Error<'_>>
This method is called to get a token from the lexer.
It should return
Ok(Some(token)) if a token is found,
Ok(None) if no token is found,
or Err(error) if an error occurs. Read moreSource§fn generates_token(&self) -> bool
fn generates_token(&self) -> bool
Auto Trait Implementations§
impl Freeze for SkipWhitespaceRule
impl RefUnwindSafe for SkipWhitespaceRule
impl Send for SkipWhitespaceRule
impl Sync for SkipWhitespaceRule
impl Unpin for SkipWhitespaceRule
impl UnwindSafe for SkipWhitespaceRule
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