pub struct ParseStack {
pub recursion_depth: usize,
pub global_iterations: usize,
}Expand description
Saved parse context. Direct port of zsh’s struct parse_stack
declared in zsh/Src/zsh.h and used by parse.c:295-355
(parse_context_save / parse_context_restore). Pushes per-
parse-call state so a nested parse (e.g. inside command
substitution) doesn’t clobber the outer parse.
zshrs port note: zsh’s parse_stack tracks wordcode-buffer state
(ecbuf, eclen, ecused, ecnpats, ecstrs, ecsoffs, ecssub, ecnfunc).
zshrs builds AST trees instead so those fields collapse to a
recursion_depth + global_iterations save. The lexer-side fields
(incmdpos, incond, etc.) live on ZshLexer here so they get saved
via the lexer’s own LexStack rather than being duplicated here.
Fields§
§recursion_depth: usize§global_iterations: usizeTrait Implementations§
Source§impl Clone for ParseStack
impl Clone for ParseStack
Source§fn clone(&self) -> ParseStack
fn clone(&self) -> ParseStack
Returns a duplicate 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 ParseStack
impl Debug for ParseStack
Source§impl Default for ParseStack
impl Default for ParseStack
Source§fn default() -> ParseStack
fn default() -> ParseStack
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ParseStack
impl RefUnwindSafe for ParseStack
impl Send for ParseStack
impl Sync for ParseStack
impl Unpin for ParseStack
impl UnsafeUnpin for ParseStack
impl UnwindSafe for ParseStack
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