Enum yash_syntax::syntax::CompoundCommand
source · pub enum CompoundCommand {
Grouping(List),
Subshell {
body: Rc<List>,
location: Location,
},
For {
name: Word,
values: Option<Vec<Word>>,
body: List,
},
While {
condition: List,
body: List,
},
Until {
condition: List,
body: List,
},
If {
condition: List,
body: List,
elifs: Vec<ElifThen>,
else: Option<List>,
},
Case {
subject: Word,
items: Vec<CaseItem>,
},
}
Expand description
Command that contains other commands.
Variants§
Grouping(List)
List as a command.
Subshell
Command for executing commands in a subshell.
For
For loop.
While
While loop.
Until
Until loop.
If
If conditional construct.
Case
Case conditional construct.
Trait Implementations§
source§impl Clone for CompoundCommand
impl Clone for CompoundCommand
source§fn clone(&self) -> CompoundCommand
fn clone(&self) -> CompoundCommand
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CompoundCommand
impl Debug for CompoundCommand
source§impl Display for CompoundCommand
impl Display for CompoundCommand
source§impl FromStr for CompoundCommand
impl FromStr for CompoundCommand
Converts a string to a compound command.
source§impl PartialEq for CompoundCommand
impl PartialEq for CompoundCommand
source§fn eq(&self, other: &CompoundCommand) -> bool
fn eq(&self, other: &CompoundCommand) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for CompoundCommand
impl StructuralPartialEq for CompoundCommand
Auto Trait Implementations§
impl Freeze for CompoundCommand
impl !RefUnwindSafe for CompoundCommand
impl !Send for CompoundCommand
impl !Sync for CompoundCommand
impl Unpin for CompoundCommand
impl !UnwindSafe for CompoundCommand
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more