pub struct Lexer {
pub pos: usize,
pub ch: char,
/* private fields */
}
Fields§
§pos: usize
§ch: char
Implementations§
Source§impl Lexer
impl Lexer
pub fn from_string(input: &str) -> Self
pub fn new(input: Vec<char>) -> Self
pub fn print_error(&self)
pub fn has_next(&self) -> bool
pub fn read_char(&mut self)
pub fn skip_whitespace(&mut self) -> bool
pub fn skip_comment(&mut self) -> bool
pub fn read_identifier(&mut self) -> String
pub fn read_number(&mut self) -> String
pub fn read_string(&mut self) -> Token
pub fn next_token(&mut self) -> Token
Trait Implementations§
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