pub struct LexBuf<'a> {
pub source: Rc<RefCell<&'a str>>,
pub line: Rc<RefCell<usize>>,
pub col: Rc<RefCell<usize>>,
pub idx: Rc<RefCell<usize>>,
pub empty: Rc<RefCell<bool>>,
}Expand description
A buffer for lexing.
This is a wrapper around a string slice that stores the current state of the lexer.
Lexing functions are provided with a buffer, which is normally automatically generated from an input string. Thus you would rarely need to use this struct directly.
Fields§
§source: Rc<RefCell<&'a str>>§line: Rc<RefCell<usize>>§col: Rc<RefCell<usize>>§idx: Rc<RefCell<usize>>§empty: Rc<RefCell<bool>>Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for LexBuf<'a>
impl<'a> !RefUnwindSafe for LexBuf<'a>
impl<'a> !Send for LexBuf<'a>
impl<'a> !Sync for LexBuf<'a>
impl<'a> Unpin for LexBuf<'a>
impl<'a> !UnwindSafe for LexBuf<'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