shithub: mc

ref: 58749a958bd44442d7d004efc1390e8f0ec43d46
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
	;;
;;