pub struct Lexer { /* private fields */ }Implementations§
Source§impl Lexer
impl Lexer
Sourcepub fn lex(&mut self, contents: &str) -> Result<VecDeque<Token>, Error>
pub fn lex(&mut self, contents: &str) -> Result<VecDeque<Token>, Error>
This function lexes the input and returns either a VecDeque of tokens or an error. The return value of this function may change to returning a vector of errors.
§Arguments
contents- The contents to lex. This may come from a file or from the REPL.
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