Remove unused pipe node definitions

The `Pipe` node and its associated logic have been removed from the AST.
This commit cleans up the code by removing all references to this
defunct node in the analyzer, binder, captures, dumper, lowering,
macros, optimizer, and type checker. The parser no longer recognizes the
`pipe` keyword.
This commit is contained in:
2026-03-23 10:22:12 +01:00
parent 99b540c84e
commit 1875cfdc9b
14 changed files with 85 additions and 256 deletions
+6
View File
@@ -315,6 +315,7 @@ pub struct Signature {
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
#[allow(unpredictable_function_pointer_comparisons)]
pub enum StaticType {
Any,
Void,
@@ -336,6 +337,9 @@ pub enum StaticType {
Function(Box<Signature>),
FunctionOverloads(Vec<Signature>),
Object(&'static str),
/// A polymorphic native function whose return type is computed from its argument types.
/// The function pointer receives the full argument type and returns the resolved return type.
PolymorphicFn(fn(&StaticType) -> Option<StaticType>),
/// A diagnostic poison type, allowing type-checking to continue after an error.
Error,
}
@@ -394,6 +398,7 @@ impl fmt::Display for StaticType {
write!(f, "overloads({} variants)", sigs.len())
}
StaticType::Object(name) => write!(f, "{}", name),
StaticType::PolymorphicFn(_) => write!(f, "<polymorphic-fn>"),
StaticType::Error => write!(f, "<error>"),
}
}
@@ -516,6 +521,7 @@ impl StaticType {
.find(|sig| sig.params == *args_ty) // 1. Try exact match first
.or_else(|| sigs.iter().find(|sig| sig.params.is_assignable_from(args_ty))) // 2. Fallback to implicit coercion
.map(|sig| sig.ret.clone()),
StaticType::PolymorphicFn(resolver) => resolver(args_ty),
_ => None,
}
}