Files
hakorune/lang/src/runner/gate_c/controller.hako

28 lines
793 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// GateC Controller (Phase 20.26)
// Responsibility: Provide a thin, stable entry to route MIR(JSON v0)
// through the Ny/Core dispatcher when a wrapper route is needed.
using selfhost.vm.core.dispatcher as NyVmDispatcher
static box GateCController {
// route_json/1: String(JSON v0) -> String(last line)
// Contract: returns a printable string (numeric or tag). No side effects.
route_json(j) {
// Delegate to the Core dispatcher runner
return NyVmDispatcher.run(j)
}
}
static box GateCControllerMain {
main(args) {
if args == null || args.length() == 0 {
print("[gate_c/core] payload missing")
return 1
}
local payload = "" + args.get(0)
local res = GateCController.route_json(payload)
if res != null { print(res) }
return 0
}
}