#[repr(C)]pub struct pm_lex_mode {
pub mode: pm_lex_mode__bindgen_ty_1,
pub as_: pm_lex_mode__bindgen_ty_2,
pub prev: *mut pm_lex_mode,
}
Expand description
When lexing Ruby source, the lexer has a small amount of state to tell which kind of token it is currently lexing. For example, when we find the start of a string, the first token that we return is a TOKEN_STRING_BEGIN token. After that the lexer is now in the PM_LEX_STRING mode, and will return tokens that are found as part of a string.
Fields§
§mode: pm_lex_mode__bindgen_ty_1
§as_: pm_lex_mode__bindgen_ty_2
§prev: *mut pm_lex_mode
The previous lex state so that it knows how to pop.
Trait Implementations§
Source§impl Clone for pm_lex_mode
impl Clone for pm_lex_mode
Source§fn clone(&self) -> pm_lex_mode
fn clone(&self) -> pm_lex_mode
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for pm_lex_mode
impl Debug for pm_lex_mode
Source§impl Default for pm_lex_mode
impl Default for pm_lex_mode
impl Copy for pm_lex_mode
Auto Trait Implementations§
impl Freeze for pm_lex_mode
impl RefUnwindSafe for pm_lex_mode
impl !Send for pm_lex_mode
impl !Sync for pm_lex_mode
impl Unpin for pm_lex_mode
impl UnwindSafe for pm_lex_mode
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