pub struct InputState {
pub stack: Vec<Level>,
pub param_stack: Vec<TokenList>,
pub align_state: i32,
pub scanner_status: ScannerStatus,
pub warning_index: CsId,
pub open_parens: usize,
pub force_eof: bool,
pub last_line: i32,
pub in_open: usize,
pub spare_tokens: Vec<TokenList>,
}Expand description
The input stack.
Fields§
§stack: Vec<Level>All levels; the last one is the current input (cur_input).
param_stack: Vec<TokenList>Arguments of macros being expanded.
align_state: i32Brace balance for alignments (align_state).
scanner_status: ScannerStatusWhat the scanner is doing.
warning_index: CsIdThe macro or definition being scanned, for diagnostics.
open_parens: usizeNumber of open parentheses printed for input files.
force_eof: boolWhether \endinput was seen in the current file.
last_line: i32Line number of the most recent \read line, etc.
in_open: usizeText levels open on files, \scantokens pseudo-files and \read
streams (TeX’s in_open).
spare_tokens: Vec<TokenList>One-token lists of backed-up levels that ended, for back_input to
reuse (it runs very often; this saves an allocation each time).
Implementations§
Source§impl InputState
impl InputState
Sourcepub fn in_token_list(&self) -> bool
pub fn in_token_list(&self) -> bool
Whether the current level is a token list.
Sourcepub fn terminal_input(&self) -> bool
pub fn terminal_input(&self) -> bool
Whether we are reading from the terminal (terminal_input).
Trait Implementations§
Source§impl Debug for InputState
impl Debug for InputState
Auto Trait Implementations§
impl !Send for InputState
impl !Sync for InputState
impl Freeze for InputState
impl RefUnwindSafe for InputState
impl Unpin for InputState
impl UnsafeUnpin for InputState
impl UnwindSafe for InputState
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