Module ast

Module ast 

Source
Expand description

Defines the Abstract Syntax Tree (ast) for shell programs. Includes types and utilities for manipulating the AST.

Structs§

AndOrList
Represents a sequence of command pipelines connected by boolean operators.
AndOrListIter
An iterator over the pipelines in an AndOrList.
ArithmeticCommand
An arithmetic command, evaluating an arithmetic expression.
ArithmeticForClauseCommand
An arithmetic for clause, which loops until an arithmetic condition is reached.
Assignment
Encapsulates an assignment declaration.
BraceGroupCommand
A brace group, which groups commands together.
CaseClauseCommand
A case clause, which selects a command based on a value and a set of pattern-based filters.
CaseItem
An individual matching case item in a case clause.
CommandPrefix
Represents a prefix to a simple command.
CommandSuffix
Represents a suffix to a simple command; a word argument, declaration, or I/O redirection.
CompoundList
A sequence of commands.
CompoundListItem
An element of a compound command list.
DoGroupCommand
A do group, which groups commands together.
ElseClause
Represents the else clause of a conditional command.
ForClauseCommand
A for clause, which loops over a set of values.
FunctionBody
Encapsulates the body of a function definition.
FunctionDefinition
Encapsulates the definition of a shell function.
IfClauseCommand
An if clause, which conditionally executes a command.
IoHereDocument
Represents an I/O here document.
Pipeline
A pipeline of commands, where each command’s output is passed as standard input to the command that follows it.
Program
Represents a complete shell program.
RedirectList
A list of I/O redirections to be applied to a command.
SimpleCommand
Represents the invocation of a simple command.
SubshellCommand
A subshell, which executes commands in a subshell.
UnexpandedArithmeticExpr
Encapsulates an unparsed arithmetic expression.
WhileOrUntilClauseCommand
A while or until clause, whose looping is controlled by a condition.
Word
Represents a shell word.

Enums§

AndOr
Represents a boolean operator used to connect command pipelines, along with the succeeding pipeline.
ArithmeticExpr
An arithmetic expression.
ArithmeticTarget
Identifies the target of an arithmetic assignment expression.
AssignmentName
The target of an assignment.
AssignmentValue
A value being assigned to a variable.
BinaryOperator
A binary arithmetic operator.
BinaryPredicate
A binary predicate usable in an extended test expression.
CaseItemPostAction
Describes the action to take after executing the body command of a case clause.
Command
Represents a shell command.
CommandPrefixOrSuffixItem
A prefix or suffix for a simple command.
CompoundCommand
Represents a compound command, potentially made up of multiple nested commands.
ExtendedTestExpr
An extended test expression.
IoFileRedirectKind
Kind of file I/O redirection.
IoFileRedirectTarget
Target for an I/O file redirection.
IoRedirect
An I/O redirection.
PipelineOperator
Represents a boolean operator used to connect command pipelines in an AndOrList
PipelineTimed
The type of timing requested for a pipeline.
ProcessSubstitutionKind
Represents the I/O direction of a process substitution.
SeparatorOperator
Indicates whether the preceding command is executed synchronously or asynchronously.
TestExpr
A (non-extended) test expression.
UnaryAssignmentOperator
A unary arithmetic assignment operator.
UnaryOperator
A unary arithmetic operator.
UnaryPredicate
A unary predicate usable in an extended test expression.

Type Aliases§

CompleteCommand
Represents a complete shell command.
CompleteCommandItem
Represents a complete shell command item.