pub struct Lex { /* private fields */ }Expand description
The lexer, plus the token buffer the rule machine peeks into.
Tokens are lexed lazily: Lex::peek produces only as many as the alt
being tried needs, under the rule that is trying it. A token already in the
buffer is NOT re-lexed when a later rule looks at it — that caching is what
makes a comment right after { a node (read under declbody) while a
comment between a property and its : is not (read under decl).
Implementations§
Auto Trait Implementations§
impl Freeze for Lex
impl RefUnwindSafe for Lex
impl Send for Lex
impl Sync for Lex
impl Unpin for Lex
impl UnsafeUnpin for Lex
impl UnwindSafe for Lex
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