#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Segment {
pub assigns: Vec<(String, String)>,
pub argv: Vec<String>,
pub redirects: Vec<Redirect>,
pub follows: Separator,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Separator {
End,
Semi,
And,
Or,
Pipe,
PipeBoth,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Redirect {
pub fd: Option<u32>,
pub op: RedirOp,
pub target: String,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum RedirOp {
OutTrunc,
OutAppend,
In,
OutDup,
InDup,
OutAll,
OutAllAppend,
OutClobber,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum Bail {
CommandSubstitution,
ProcessSubstitution,
Heredoc,
HereString,
Arithmetic,
Subshell,
BraceGroup,
CompoundCommand,
ArrayLiteral,
UnterminatedQuote,
UnexpectedToken,
}