pub struct LexState {
pub current: i32,
pub linenumber: i32,
pub lastline: i32,
pub t: LexToken,
pub lookahead: LexToken,
pub fs: Option<Box<FuncState>>,
pub dyd: DynData,
pub source: Option<GcRef<LuaString>>,
pub envn: Option<GcRef<LuaString>>,
pub lex: LexState,
pub recursion_depth: u32,
}Expand description
PORT NOTE: This is a Phase A stub. In Phase B, LexState lives in
lua-lex and lua-parse imports it. FuncState will move here
or be passed separately. The fs field creates a circular-crate
dependency that Phase B must resolve (likely: both live in one crate).
Fields§
§current: i32§linenumber: i32§lastline: i32§t: LexToken§lookahead: LexToken§fs: Option<Box<FuncState>>§dyd: DynData§source: Option<GcRef<LuaString>>§envn: Option<GcRef<LuaString>>§lex: LexStateUnderlying lexer state that owns the ZIO stream and lex buffer.
The parser drives the lexer by calling lex_next / lex_lookahead,
which forward to lua_lex::next / lua_lex::lookahead on this inner
state and then mirror the resulting token into self.t / self.lookahead.
recursion_depth: u32Parser recursion depth for C-Lua’s enterlevel / leavelevel guard.
Auto Trait Implementations§
impl Freeze for LexState
impl !RefUnwindSafe for LexState
impl !Send for LexState
impl !Sync for LexState
impl Unpin for LexState
impl UnsafeUnpin for LexState
impl !UnwindSafe for LexState
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