Skip to main content

Module parser

Module parser 

Source
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§

LexedToken
Token produced by the shell lexer.
Lexer
Source-backed lexer for shell scripts.
ParseDiagnostic
A parser diagnostic emitted while recovering from invalid input.
ParseResult
The result of parsing a script.
Parser
Stateful parser for shell scripts.
ShellProfile
Complete shell parsing profile.
SyntaxFacts
Additional parser-owned facts that are useful to downstream consumers.
ZshCaseGroupPart
One branch separator recognized inside a zsh case pattern group.
ZshOptionState
Snapshot of parser-visible zsh option state.

Enums§

OptionValue
Tri-state value for a parser-visible zsh option.
ParseStatus
Overall outcome of a parse attempt.
ShellDialect
Supported shell dialects for parser syntax decisions.
ZshEmulationMode
Target emulation mode for zsh’s emulate behavior.

Functions§

text_is_self_contained_arithmetic_expression
Returns whether text parses as an arithmetic expression without variable references, subscripts, shell words, or assignments.
text_looks_like_nontrivial_arithmetic_expression
Returns whether text parses as a nontrivial arithmetic expression.