✓
Passing This code compiles and runs correctly.
Code
// Test 618: Explicit Source Parameter
// First validate that explicit source: { } syntax works
// TODO: Test implicit syntax after this works
// Validates that Source parameters work like Source with implicit parameter name
~import std/io
~[comptime|transform]tor capture.source {
source: Source,
item: *const Item
} -> Item
~proc capture.source|zig {
// For MVP: Just return the item unchanged to prove transform machinery works
// TODO: Actually transform the source into inline code
return item.*;
}
// Use explicit source parameter
// The transform replaces this entire flow with a new AST node
~capture.source {
const x = 42;
const y = x + 1;
} -> _ |> _
Flows
flow ~capture.source click a branch to expand · @labels scroll to their anchor
capture.source (source: const x = 42;
const y = x + 1;)