#[derive(Debug, Clone)]
pub struct Command {
pub name: String,
pub args: Vec<Arg>,
}
#[derive(Debug, Clone)]
pub enum Arg {
Word(String),
Str(String),
Block(Vec<Command>),
}
impl Arg {
pub fn as_str(&self) -> Option<&str> {
match self {
Arg::Word(s) | Arg::Str(s) => Some(s),
Arg::Block(_) => None,
}
}
}