pub struct parse_stack {Show 19 fields
pub hdocs: Option<Box<heredocs>>,
pub lex_heredocs: Vec<HereDoc>,
pub incmdpos: bool,
pub aliasspaceflag: i32,
pub incond: i32,
pub inredir: bool,
pub incasepat: i32,
pub isnewlin: i32,
pub infor: i32,
pub inrepeat_: i32,
pub intypeset: bool,
pub eclen: i32,
pub ecused: i32,
pub ecnpats: i32,
pub ecbuf: Option<Vec<u32>>,
pub ecstrs: Option<Vec<u8>>,
pub ecsoffs: i32,
pub ecssub: i32,
pub ecnfunc: i32,
}Expand description
Direct port of struct parse_stack at Src/zsh.h:3099-3109.
Used by parse_context_save / parse_context_restore
(parse.c:295-355) to snapshot per-parse-call state so a nested
parse (e.g. inside command substitution) doesn’t clobber the
outer parse.
A second port of struct parse_stack exists at
crate::ported::zsh_h::parse_stack (zsh.h:1066) using canonical
Wordcode / Eccstr / struct heredocs types — that port is unused
today and will become authoritative when Phase 9b (PORT_PLAN.md)
wires wordcode emission. This local version uses the working-set
shapes (Vec<HereDoc>, stubbed wordcode fields) suited to zshrs’s
pre-wordcode AST architecture; the consolidation happens in P9b.
Fields§
§hdocs: Option<Box<heredocs>>Pending heredocs awaiting body collection (canonical C
linked-list shape). C: struct heredocs *hdocs (zsh.h:3100).
Mirrors parse::HDOCS thread_local across nested parses.
lex_heredocs: Vec<HereDoc>!!! WARNING: NOT IN PARSE_STACK — Rust-only AST-glue !!!
Snapshot of lex::LEX_HEREDOCS (the parallel Rust-only Vec
carrying terminator / strip_tabs / quoted metadata).
Saved/restored alongside the canonical hdocs so nested
parses get a clean AST view. C’s parse_stack has no analog
because C tracks terminator metadata implicitly via tokstr.
incmdpos: boolC: int incmdpos (zsh.h:3102).
aliasspaceflag: i32C: int aliasspaceflag (zsh.h:3103).
incond: i32C: int incond (zsh.h:3104).
inredir: boolC: int inredir (zsh.h:3105).
incasepat: i32C: int incasepat (zsh.h:3106).
isnewlin: i32C: int isnewlin (zsh.h:3107).
infor: i32C: int infor (zsh.h:3108).
inrepeat_: i32C: int inrepeat_ (zsh.h:3109).
intypeset: boolC: int intypeset (zsh.h:3110).
eclen: i32§ecused: i32§ecnpats: i32§ecbuf: Option<Vec<u32>>§ecstrs: Option<Vec<u8>>§ecsoffs: i32§ecssub: i32§ecnfunc: i32Trait Implementations§
Source§impl Clone for parse_stack
impl Clone for parse_stack
Source§fn clone(&self) -> parse_stack
fn clone(&self) -> parse_stack
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for parse_stack
impl Debug for parse_stack
Source§impl Default for parse_stack
impl Default for parse_stack
Source§fn default() -> parse_stack
fn default() -> parse_stack
Auto Trait Implementations§
impl Freeze for parse_stack
impl RefUnwindSafe for parse_stack
impl Send for parse_stack
impl Sync for parse_stack
impl Unpin for parse_stack
impl UnsafeUnpin for parse_stack
impl UnwindSafe for parse_stack
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more