Struct yash_syntax::syntax::SimpleCommand
source · [−]pub struct SimpleCommand<H = HereDoc> {
pub assigns: Vec<Assign>,
pub words: Vec<Word>,
pub redirs: Rc<Vec<Redir<H>>>,
}
Expand description
Command that involves assignments, redirections, and word expansions.
In the shell language syntax, a valid simple command must contain at least one of assignments, redirections, and words. The parser must not produce a completely empty simple command.
Fields
assigns: Vec<Assign>
words: Vec<Word>
redirs: Rc<Vec<Redir<H>>>
Implementations
Trait Implementations
type Full = SimpleCommand
type Full = SimpleCommand
Final AST created by filling self
.
Converts a string to a simple command.
Returns Err(None)
if the first token does not start a simple command.
This function does not support parsing a command that contains a here-document.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl<H = HereDoc> !RefUnwindSafe for SimpleCommand<H>
impl<H = HereDoc> !Send for SimpleCommand<H>
impl<H = HereDoc> !Sync for SimpleCommand<H>
impl<H> Unpin for SimpleCommand<H>
impl<H = HereDoc> !UnwindSafe for SimpleCommand<H>
Blanket Implementations
Mutably borrows from an owned value. Read more