Enum conch_parser::ast::CompoundCommandKind [] [src]

pub enum CompoundCommandKind<V, W, C> {
    Brace(Vec<C>),
    Subshell(Vec<C>),
    While(GuardBodyPair<C>),
    Until(GuardBodyPair<C>),
    If {
        conditionals: Vec<GuardBodyPair<C>>,
        else_branch: Option<Vec<C>>,
    },
    For {
        var: V,
        words: Option<Vec<W>>,
        body: Vec<C>,
    },
    Case {
        word: W,
        arms: Vec<PatternBodyPair<W, C>>,
    },
}

A specific kind of a CompoundCommand.

Generic over the representation of shell words and commands.

Variants

A group of commands that should be executed in the current environment.

A group of commands that should be executed in a subshell environment.

A command that executes its body as long as its guard exits successfully.

A command that executes its body as until as its guard exits unsuccessfully.

A conditional command that runs the respective command branch when a certain of the first condition that exits successfully.

Fields of If

A list of conditional branch-body pairs.

An else part to run if no other conditional was taken.

A command that binds a variable to a number of provided words and runs its body once for each binding.

Fields of For

The variable to bind to each of the specified words.

The words to bind to the specified variable one by one.

The body to run with the variable binding.

A command that behaves much like a match statment in Rust, running a branch of commands if a specified word matches another literal or glob pattern.

Fields of Case

The word on which to check for pattern matches.

The arms to match against.

Trait Implementations

impl<V: Debug, W: Debug, C: Debug> Debug for CompoundCommandKind<V, W, C>
[src]

Formats the value using the given formatter.

impl<V: PartialEq, W: PartialEq, C: PartialEq> PartialEq for CompoundCommandKind<V, W, C>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<V: Eq, W: Eq, C: Eq> Eq for CompoundCommandKind<V, W, C>
[src]

impl<V: Clone, W: Clone, C: Clone> Clone for CompoundCommandKind<V, W, C>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more