?
Unknown Status unknown.
Code
// Test: User-land parser access
// Verify that std/koru is available at runtime for dynamic parsing
~import std/koru
~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/koru: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 }}")
Expected output
Parser works! Got AST with 1 items
Flows
flow ~parse.source click a branch to expand · @labels scroll to their anchor
parse.source (source: test_source, file_name: "test.kz", allocator)
Test Configuration
MUST_RUN