feat: Implement Pipeline support

Adds support for pipelines, allowing streams to be chained together and
transformed.
This includes new types for `PipeStream` and `SourceAdapter`, along with
modifications
to the `Environment` to manage pipeline execution. A new example
`pipeline.myc`
demonstrates its usage.
This commit is contained in:
Michael Schimmel
2026-03-02 00:32:07 +01:00
parent 807903efbb
commit 2457eec1bf
7 changed files with 103 additions and 29 deletions
+9 -1
View File
@@ -592,7 +592,15 @@ impl fmt::Display for Value {
}
Value::FieldAccessor(k) => write!(f, ".{}", k.name()),
Value::Function(f_meta) => write!(f, "<native fn, {:?}>", f_meta.purity),
Value::Object(o) => write!(f, "<{}>", o.type_name()),
Value::Object(o) => {
if let Some(pipe) = o.as_any().downcast_ref::<crate::ast::rtl::streams::PipelineNode>() {
write!(f, "PipelineNode[last: {:?}]", pipe.series.get_item(0))
} else if let Some(val_series) = o.as_any().downcast_ref::<crate::ast::rtl::series::SharedValueSeries>() {
write!(f, "SharedValueSeries[len: {}]", val_series.buffer.borrow().len())
} else {
write!(f, "<{}>", o.type_name())
}
}
Value::Cell(c) => write!(f, "{}", c.borrow()),
Value::TailCallRequest(_) => write!(f, "<tail call request>"),
}