Skip to main content

Module parser

Module parser 

Source
Expand description

Zsh parser - Direct port from zsh/Src/parse.c

This parser takes tokens from the ZshLexer and builds an AST. It follows the zsh grammar closely, producing structures that can be executed by the shell executor.

Structs§

CaseArm
HereDocInfo
ListFlags
ParseError
Parse errors
Redirect
Redirect
ShellLexer
ShellParser
SimpleCommand
Simple command with assignments, words, and redirects
SublistFlags
ZshAssign
An assignment
ZshCase
Case statement
ZshFor
For loop
ZshFuncDef
Function definition
ZshIf
If statement
ZshList
A list is a sequence of sublists separated by ; or & or newline
ZshParser
The Zsh Parser
ZshPipe
A pipeline is commands connected by |
ZshProgram
AST node for a complete program (list of commands)
ZshRedir
A redirection
ZshRepeat
Repeat loop
ZshSimple
A simple command (assignments, words, redirections)
ZshSublist
A sublist is pipelines connected by && or ||
ZshTry
Try/always block
ZshWhile
While/Until loop

Enums§

CaseTerm
CaseTerminator
Case terminator
CompoundCommand
Compound command
CondExpr
Conditional expression for [[ ]]
ForList
ListOp
List operator (for shell command lists)
RedirType
Redirection type
RedirectOp
Redirect operator
ShellCommand
Shell command - the old shell_ast compatible type
ShellToken
ShellWord
Shell word - can be simple literal or complex expansion
SublistOp
VarModifier
Variable modifier for parameter expansion
ZshAssignValue
ZshCommand
A command
ZshCond
Conditional expression [[ … ]]
ZshParamFlag
Zsh parameter expansion flags