○
Planned This feature is planned but not yet implemented.
STATUS: PARSER WORK PENDING / FEATURE UNCERTAIN
Failure Output
Showing last 10 of 19 lines
Build Summary: 1/5 steps succeeded; 1 failed
install transitive failure
+- install backend transitive failure
+- compile exe backend Debug native transitive failure
+- compile obj backend_output Debug native 1 errors
+- compile obj backend_output Debug native (reused)
error: the following build command failed with exit code 1:
.zig-cache/o/195bfece1a65b20c593fcfa0f1f0e846/build /opt/homebrew/Cellar/zig/0.15.2_1/bin/zig /opt/homebrew/Cellar/zig/0.15.2_1/lib/zig /Users/larsde/src/koru/tests/regression/200_COMPILER_FEATURES/210_PARSER/210_039_file_source_syntax .zig-cache /var/folders/9k/sprb5df11_79lbnlyttj6sfm0000gn/T/koru-regression-cache --seed 0xfe83e237 -Z7103d220c0b8cc54 Code
// Test 210_039: File Source Syntax
// Validates the [type]"path" syntax for reading files as Source at compile time
//
// Syntax: ~event [type]"path"
const std = @import("std");
// Event that takes Source parameter
~[comptime|transform]event render.file {
source: Source[text],
program: *const Program,
allocator: std.mem.Allocator
}
| transformed *const Program
~proc render.file|zig {
// Just print what we received to prove file was read
std.debug.print("File content: '{s}'\n", .{source.text});
std.debug.print("Phantom type: '{s}'\n", .{source.phantom_type orelse "none"});
// Return program unchanged
return .{ .transformed = program };
}
// Test: Read file content using [type]"path" syntax
~render.file [text]"hello.txt"
| transformed _ |> _
Test Configuration
MUST_RUN