shithub: mc

ref: a72122d49d80fae5d7ffce3a7eeb47b320b9f2c6
dir: /lib/std/assert.myr/

View raw version
use "fmt"
use "syswrap"
use "varargs"

pkg std =
	const assert	: (cond : bool, fmt : byte[:], args : ... -> void)
;;

const assert = {cond, msg, args
	var ap

	ap = vastart(&args)
	if !cond
		std.fputv(2, msg, &ap)
		suicide()
	;;
}