pub struct State { /* private fields */ }Expand description
A struct representing the state of a lexer at a specific time.
Implementations§
Source§impl State
impl State
Sourcepub const fn increment_position_by_char(&mut self, character: char)
pub const fn increment_position_by_char(&mut self, character: char)
Move the state by the passed character.
Sourcepub const fn increment_position(&mut self, amount: u32)
pub const fn increment_position(&mut self, amount: u32)
Move th state ahead by the passed amount of characters.
Sourcepub const fn lexer_position(&self) -> Position
pub const fn lexer_position(&self) -> Position
Get the current file position.
Trait Implementations§
Source§impl Ord for State
impl Ord for State
Source§impl PartialOrd for State
impl PartialOrd for State
impl Eq for State
impl StructuralPartialEq for State
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
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