pub struct Cursor<'lex> { /* private fields */ }Implementations§
Source§impl<'lex> Cursor<'lex>
impl<'lex> Cursor<'lex>
pub fn new(source: &'lex str, base_offset: usize) -> Self
pub fn step(&mut self)
pub fn is_finished(&self) -> bool
pub fn current_offset(&self) -> usize
pub fn current_len(&self) -> usize
pub fn current_lexem(&self) -> &str
pub fn current_span(&self) -> Span
pub fn line(&self) -> usize
pub fn col(&self) -> usize
pub fn advance(&mut self) -> char
pub fn advance_while<F>(&mut self, f: F) -> bool
pub fn peek(&self) -> char
pub fn peek_next(&self) -> char
pub fn match_next(&mut self, c: char) -> bool
Auto Trait Implementations§
impl<'lex> Freeze for Cursor<'lex>
impl<'lex> RefUnwindSafe for Cursor<'lex>
impl<'lex> Send for Cursor<'lex>
impl<'lex> Sync for Cursor<'lex>
impl<'lex> Unpin for Cursor<'lex>
impl<'lex> UnwindSafe for Cursor<'lex>
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