pub struct Lexer { /* private fields */ }Implementations§
Source§impl Lexer
impl Lexer
pub fn new() -> Lexer
pub fn from(tokens: Vec<Token>) -> Lexer
pub fn get_tokens(&self) -> &Vec<Token>
pub fn reset(&mut self)
pub fn bin_op(v: &str) -> Option<(BinOp, u8)>
pub fn next_token(&mut self) -> bool
pub fn previous_token(&mut self) -> bool
pub fn tokens_remaining(&self) -> usize
pub fn current_token(&self) -> &Token
pub fn current_token_content(&self) -> String
pub fn match_current_token(&self, t: TokenType) -> Result<&Token, String>
pub fn tokenize(&mut self, source: String) -> Result<(), String>
Auto Trait Implementations§
impl Freeze for Lexer
impl RefUnwindSafe for Lexer
impl Send for Lexer
impl Sync for Lexer
impl Unpin for Lexer
impl UnwindSafe for Lexer
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