✓
Passing This code compiles and runs correctly.
Code
// Test: User-land parser access
// Verify that std/parser is available at runtime for dynamic parsing
~import std/parser
~import std/io
const std = @import("std");
// We need an allocator available at runtime
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = gpa.allocator();
// The source we want to parse
const test_source = "~greet()";
// Main flow - parse and report
~std/parser:parse.source(source: test_source, file_name: "test.kz", allocator)
| parsed p |> std/io:print.ln("Parser works! Got AST with {{ p.source_file.items.len:d }} items")
| parse-error e |> std/io:print.ln("Parse failed: {{ e:s }}")
Actual
Parser works! Got AST with 1 items
Expected output
Parser works! Got AST with 1 items
Test Configuration
MUST_RUN