pub fn parse_event(endtok: lextok) -> Option<ZshProgram>Expand description
Port of parse_event() from Src/parse.c:614 (body c:615-631).
Top-level parse-event entry. Reads one event from the lexer (a
sublist optionally followed by SEPER/AMPER/AMPERBANG) and
returns the resulting ZshProgram.
endtok is the token that terminates the event — usually
ENDINPUT, but for command-style substitutions the closing
) (zsh’s CMD_SUBST_CLOSE).
zshrs port note: zsh’s parse_event returns an Eprog (heap-
allocated wordcode program). zshrs returns a ZshProgram
(AST root). Same role at the parse-output boundary.