Expand description
Parsing entrypoints, lexer types, and shell-profile configuration. Parser entrypoints, lexical types, and shell-profile configuration.
The parser is recursive descent and produces shuck-ast syntax trees while also collecting
recovery diagnostics and lightweight syntax facts needed by downstream tooling.
Structs§
- Heredoc
Read - Result of reading a heredoc body from the source.
- Lexed
Token - Token produced by the shell lexer.
- Lexed
Word - Source-backed representation of a shell word produced by the lexer.
- Lexed
Word Segment - One segment of a lexed shell word, optionally backed by source text.
- Lexer
- Lexer for bash scripts.
- Parse
Diagnostic - A parser diagnostic emitted while recovering from invalid input.
- Parse
Result - The result of parsing a script, including any recovery diagnostics and syntax facts collected along the way.
- Parser
- Parser for bash scripts.
- Shell
Profile - Dialect plus optional zsh option state used to configure the lexer and parser.
- Syntax
Facts - Additional parser-owned facts that are useful to downstream consumers.
- ZshCase
Group Part - One branch separator recognized inside a zsh
casepattern group. - ZshOption
State - Snapshot of zsh option state used by the parser and lexer.
Enums§
- Lexed
Word Segment Kind - Classification of one segment inside a lexed shell word.
- Lexer
Error Kind - Kinds of lexer error payloads attached to
TokenKind::Error. - Option
Value - Tri-state option value used when modeling zsh option state.
- Parse
Status - Overall outcome of a parse attempt.
- Shell
Dialect - Supported shell dialects for parsing.
- ZshEmulation
Mode - Target emulation mode for zsh’s
emulatebehavior.
Functions§
- text_
is_ self_ contained_ arithmetic_ expression - Returns whether
textparses as an arithmetic expression without variable references or assignments. - text_
looks_ like_ nontrivial_ arithmetic_ expression - Returns whether
textparses as a nontrivial arithmetic expression.