pub struct Tokenizer { /* private fields */ }
Expand description
Holds a stream of tokens.
Implementations§
Source§impl Tokenizer
impl Tokenizer
Sourcepub fn get_tokens(&mut self) -> Vec<Token>
pub fn get_tokens(&mut self) -> Vec<Token>
Returns all tokens without consuming the tokenizer.
Sourcepub fn chk_silent(&self) -> bool
pub fn chk_silent(&self) -> bool
Checks whether or not the last token is a semicolon.
Lines that end with semicolons are not displayed.
Sourcepub fn get_next_precedence(&self) -> u8
pub fn get_next_precedence(&self) -> u8
Get the precedence of the next token.
Auto Trait Implementations§
impl Freeze for Tokenizer
impl RefUnwindSafe for Tokenizer
impl Send for Tokenizer
impl Sync for Tokenizer
impl Unpin for Tokenizer
impl UnwindSafe for Tokenizer
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