pub struct Lexer<'input> { /* private fields */ }
Implementations
sourceimpl<'input> Lexer<'input>
impl<'input> Lexer<'input>
pub fn new(text: &'input str, file_hash: FileHash) -> Lexer<'input>
pub fn peek(&self) -> Tok
pub fn content(&self) -> &'input str
pub fn file_hash(&self) -> FileHash
pub fn start_loc(&self) -> usize
pub fn previous_end_loc(&self) -> usize
pub fn lookahead_with_start_loc(&mut self) -> Result<(Tok, usize), Diagnostic>
pub fn lookahead(&mut self) -> Result<Tok, Diagnostic>
pub fn lookahead2(&mut self) -> Result<(Tok, Tok), Diagnostic>
pub fn match_doc_comments(&mut self)
pub fn check_and_get_doc_comments(
&mut self,
env: &mut CompilationEnv
) -> MatchedFileCommentMap
pub fn advance(&mut self) -> Result<(), Diagnostic>
pub fn replace_token(&mut self, token: Tok, len: usize)
Auto Trait Implementations
impl<'input> RefUnwindSafe for Lexer<'input>
impl<'input> Send for Lexer<'input>
impl<'input> Sync for Lexer<'input>
impl<'input> Unpin for Lexer<'input>
impl<'input> UnwindSafe for Lexer<'input>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more