pub struct Lexer<'source, 'ast, 'name, 'names>where
'name: 'ast,{ /* private fields */ }Implementations§
Source§impl<'source, 'ast, 'name, 'names> Lexer<'source, 'ast, 'name, 'names>where
'name: 'ast,
impl<'source, 'ast, 'name, 'names> Lexer<'source, 'ast, 'name, 'names>where
'name: 'ast,
pub fn new( source: &'source [u8], names: &'names mut AstNameTable<'name>, ) -> Self
pub fn with_position( source: &'source [u8], names: &'names mut AstNameTable<'name>, start_position: Position, ) -> Self
pub fn source(&self) -> &'source [u8] ⓘ
pub fn set_read_names(&mut self, read_names: bool)
pub fn next_token_span( &mut self, skip_comments: bool, ) -> (Token<'source, 'ast>, usize, usize)
pub fn next_lexeme(&mut self, skip_comments: bool) -> LexedToken<'source, 'ast>
pub fn advance_lexeme(&mut self, skip_comments: bool)
pub fn current_lexeme(&self) -> LexedToken<'source, 'ast>
pub fn current_token(&self) -> Token<'source, 'ast>
pub fn current_location(&self) -> Location
pub fn current_span(&self) -> (usize, usize)
pub fn previous_location(&self) -> Location
pub fn lookahead_token(&mut self, skip_comments: bool) -> Token<'source, 'ast>
pub fn lookahead_nth_token( &mut self, n: usize, skip_comments: bool, ) -> Token<'source, 'ast>
pub fn lookahead_lexeme( &mut self, skip_comments: bool, ) -> LexedToken<'source, 'ast>
pub fn lookahead_nth_lexeme( &mut self, n: usize, skip_comments: bool, ) -> LexedToken<'source, 'ast>
Trait Implementations§
Auto Trait Implementations§
impl<'source, 'ast, 'name, 'names> !RefUnwindSafe for Lexer<'source, 'ast, 'name, 'names>
impl<'source, 'ast, 'name, 'names> !Send for Lexer<'source, 'ast, 'name, 'names>
impl<'source, 'ast, 'name, 'names> !Sync for Lexer<'source, 'ast, 'name, 'names>
impl<'source, 'ast, 'name, 'names> !UnwindSafe for Lexer<'source, 'ast, 'name, 'names>
impl<'source, 'ast, 'name, 'names> Freeze for Lexer<'source, 'ast, 'name, 'names>
impl<'source, 'ast, 'name, 'names> Unpin for Lexer<'source, 'ast, 'name, 'names>
impl<'source, 'ast, 'name, 'names> UnsafeUnpin for Lexer<'source, 'ast, 'name, 'names>
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