shithub: mc

ref: 321aec6bf2b82698196a94725e37cee135b1fe2b
dir: /lib/json/types.myr/

View raw version
use std

pkg json =
	type elt = union
		`Null
		`Bool	bool
		`Num	flt64
		`Str	byte[:]
		`Arr	elt#[:]
		`Obj	(byte[:], elt#)[:]
	;;

	type err = struct
		e	: errtype
		line	: std.size
		off	: std.size
	;;

	type errtype = union
		`Badesc char
		`Junk char
		`Depth
		`End
	;;
;;