pub struct Lexer<'a> {
pub loc: Loc,
/* private fields */
}
Fields§
§loc: Loc
Implementations§
source§impl<'a> Lexer<'a>
impl<'a> Lexer<'a>
pub fn new(input: &'a str, language: ParserLanguage) -> Lexer<'a>
pub fn lookahead_char_is<P: FnOnce(char) -> bool>(&self, p: P) -> bool
pub fn skip_ws(&mut self) -> LexerResult<()>
pub fn take_while<F>(&mut self, f: F) -> &'a str
pub fn next_char_if_eq(&mut self, expect: char) -> bool
pub fn next_int_lit_opt(&mut self) -> LexerResult<Option<u64>>
pub fn next_json_char_value(&mut self) -> LexerResult<char>
pub fn next_token(&mut self) -> LexerResult<Option<TokenWithLocation>>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Lexer<'a>
impl<'a> RefUnwindSafe for Lexer<'a>
impl<'a> Send for Lexer<'a>
impl<'a> Sync for Lexer<'a>
impl<'a> Unpin for Lexer<'a>
impl<'a> UnwindSafe for Lexer<'a>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)