pub enum Ast {
Show 13 variants
Pipeline(Vec<ShellCommand>),
Sequence(Vec<Ast>),
Assignment {
var: String,
value: String,
},
LocalAssignment {
var: String,
value: String,
},
If {
branches: Vec<(Box<Ast>, Box<Ast>)>,
else_branch: Option<Box<Ast>>,
},
Case {
word: String,
cases: Vec<(Vec<String>, Ast)>,
default: Option<Box<Ast>>,
},
For {
variable: String,
items: Vec<String>,
body: Box<Ast>,
},
While {
condition: Box<Ast>,
body: Box<Ast>,
},
FunctionDefinition {
name: String,
body: Box<Ast>,
},
FunctionCall {
name: String,
args: Vec<String>,
},
Return {
value: Option<String>,
},
And {
left: Box<Ast>,
right: Box<Ast>,
},
Or {
left: Box<Ast>,
right: Box<Ast>,
},
}Variants§
Pipeline(Vec<ShellCommand>)
Sequence(Vec<Ast>)
Assignment
LocalAssignment
If
Case
For
While
FunctionDefinition
FunctionCall
Return
And
Or
Trait Implementations§
impl Eq for Ast
impl StructuralPartialEq for Ast
Auto Trait Implementations§
impl Freeze for Ast
impl RefUnwindSafe for Ast
impl Send for Ast
impl Sync for Ast
impl Unpin for Ast
impl UnwindSafe for Ast
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