Structs§
- AndOr
Binary - Binary and-or metadata used by
AndOrList::BinOp. - Arithm
Assignment Expr - Arithm
Binary Expr - Arithm
Conditional Expr - Arithm
Literal - An arithmetic expression node.
- Arithm
Raw - Arithm
Unary Expr - Arithm
Variable - Arithmetic
Expansion - Arithmetic expansion metadata for
Word::Arithmetic. - Assignment
- A variable assignment:
NAME=VALUE. - Case
Clause - A case clause.
- Case
Item - A single case item:
pattern [| pattern]...) body ;;. - Command
List - A command list entry: an and-or list optionally followed by
&. - Command
Substitution - Command substitution metadata for
Word::Command. - Compound
Command - Compound-command payload used by brace groups and subshells.
- Else
Clause - Else-body payload used by
ElsePart::Else. - ForClause
- A for loop clause.
- Function
Definition - A function definition.
- IfClause
- An if-elif-else clause.
- IoRedirect
- A single I/O redirection.
- Loop
Clause - A while or until loop.
- Parameter
Expansion - Parameter expansion metadata for
Word::Parameter. - Pipeline
- A pipeline:
[!] cmd1 | cmd2 | .... - Position
- Source position within the input stream.
- Program
- A complete shell program.
- Range
- A range of source positions.
- Simple
Command - A simple command with optional assignments, arguments, and redirections.
- String
Word - Literal string segment metadata for
Word::String. - Word
List - Word-list metadata for
Word::List.
Enums§
- AndOr
List - An and-or list node.
- Arithm
Assign Op - Arithmetic assignment operator.
- Arithm
BinOp - Binary arithmetic operator.
- Arithm
Expr - An arithmetic expression node.
- Arithm
UnOp - Unary arithmetic operator.
- BinOp
Type - Type of binary and-or operator.
- Command
- A command node.
- Else
Part - The else/elif portion of an if clause.
- IoRedirect
Op - I/O redirection operator.
- Loop
Type - Loop type: while or until.
- Parameter
Op - Parameter expansion operator, e.g.
${var:-default}. - Word
- A word node in the AST.
Traits§
- Spanned
- A syntax node that can report a source span.
- Visitor
- AST visitor for traversing shell syntax trees.
Functions§
- walk_
and_ or_ list - Recursively walk an and-or list.
- walk_
arithm_ expr - Recursively walk one arithmetic expression tree.
- walk_
assignment - Recursively walk one assignment.
- walk_
brace_ group - Recursively walk a brace group body and its redirections.
- walk_
case_ clause - Recursively walk a case-clause.
- walk_
case_ item - Recursively walk one case-item.
- walk_
command - Recursively walk a command.
- walk_
command_ list - Recursively walk one command-list entry.
- walk_
else_ part - Recursively walk an else-part.
- walk_
for_ clause - Recursively walk a for-clause.
- walk_
function_ definition - Recursively walk a function definition.
- walk_
if_ clause - Recursively walk an if-clause.
- walk_
io_ redirect - Recursively walk one redirection.
- walk_
loop_ clause - Recursively walk a loop-clause.
- walk_
pipeline - Recursively walk a pipeline.
- walk_
program - Recursively walk a full program.
- walk_
simple_ command - Recursively walk a simple command.
- walk_
subshell - Recursively walk a subshell body and its redirections.
- walk_
word - Recursively walk one word tree.