shithub: mc

ref: d7740736da8f2ca830d558cdedd89266b9019375
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
	;;
;;