✓
Passing This code compiles and runs correctly.
Code
// Test 210_040: Expression String Capture
// Validates that Expression parameters correctly capture strings with special chars
const std = @import("std");
~[comptime|transform]tor test.expr { expr: Expression, program: *const std/compiler:Program, allocator: std.mem.Allocator } -> *const Program
~proc test.expr|zig {
std.debug.print("Captured expression: '{s}'\n", .{expr});
return program;
}
// Test 1: Simple string with comma inside
~test.expr("Hello, world")
// Test 2: String with multiple commas
~test.expr("one, two, three")
// Test 3: Escaped quotes - works!
~test.expr("Hello \"world\"")
Flows
flow ~test.expr click a branch to expand · @labels scroll to their anchor
test.expr (expr: "Hello, world")
flow ~test.expr click a branch to expand · @labels scroll to their anchor
test.expr (expr: "one, two, three")
flow ~test.expr click a branch to expand · @labels scroll to their anchor
test.expr (expr: "Hello \"world\"")
Test Configuration
MUST_RUN