mirror of
https://github.com/danbulant/nushell
synced 2026-05-21 21:39:15 +00:00
At the moment the pipeline parser does not enforce that there must be a pipe between each part of the pipeline, which can lead to confusing behaviour or misleading errors.
19 lines
511 B
Rust
19 lines
511 B
Rust
use crate::parser::CallNode;
|
|
use crate::{Span, Tagged};
|
|
use derive_new::new;
|
|
use getset::Getters;
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, new)]
|
|
pub struct Pipeline {
|
|
pub(crate) parts: Vec<PipelineElement>,
|
|
pub(crate) post_ws: Option<Span>,
|
|
}
|
|
|
|
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Getters, new)]
|
|
pub struct PipelineElement {
|
|
pub pipe: Option<Span>,
|
|
pub pre_ws: Option<Span>,
|
|
#[get = "pub(crate)"]
|
|
call: Tagged<CallNode>,
|
|
pub post_ws: Option<Span>,
|
|
}
|