Feat: Add Pipe Node
Introduces a new `Pipe` node to the Abstract Syntax Tree (AST). This node represents a functional composition pattern, allowing for chaining of operations. The changes include: - Defining the `Pipe` variant in `BoundKind` and `UntypedKind`. - Implementing parsing logic for the `pipe` keyword. - Adding handling for the `Pipe` node in various compiler passes (analyzer, binder, captures, dumper, macros, optimizer, TCO, type checker). - Including a placeholder implementation for `Pipe` execution in the VM. - Updating integration tests to use the new `pipe` syntax.
This commit is contained in:
@@ -364,7 +364,7 @@ mod tests {
|
||||
fn test_multi_level_destructuring() {
|
||||
let env = Environment::new();
|
||||
let source = "(do
|
||||
(def pipe (fn [conf]
|
||||
(def process_data (fn [conf]
|
||||
(do
|
||||
(def [str s] conf)
|
||||
(def [f ss] s)
|
||||
@@ -372,7 +372,7 @@ mod tests {
|
||||
)
|
||||
)
|
||||
)
|
||||
(pipe [\"btc\" [:close \"cls\"]]))";
|
||||
(process_data [\"btc\" [:close \"cls\"]]))";
|
||||
|
||||
let res = env.run_script(source).unwrap();
|
||||
assert_eq!(
|
||||
|
||||
Reference in New Issue
Block a user