shithub: mc

ref: 3456a5b71887bb64aa8eac957a287a78b8ce9f28
dir: /types.myr/

View raw version
use std

pkg bld =
	type parser = struct
		cmd	: byte[:][:]
		/* parse input */
		data	: byte[:]
		rest	: byte[:]
		fname	: byte[:]
		line	: int

		/* build params */
		targs	: targ[:]
		gensrc	: std.htab(byte[:], gentarg#)#
		prefix	: byte[:]
		system	: byte[:]
		arch	: byte[:]
	;;

	type depgraph = struct
		roots	: byte[:][:]
		deps	: std.htab(byte[:], byte[:][:])#
		libs	: std.htab(byte[:], byte[:][:])#
		input	: std.htab(byte[:], byte[:])#
		sources	: std.htab(byte[:], bool)#
		updated	: std.htab(byte[:], bool)#
		seen	: std.htab(byte[:], bool)#
		done	: std.htab(byte[:], bool)#
	;;

	type myrtarg = struct
		name	: byte[:]
		inputs	: byte[:][:]
		libdeps	: byte[:][:]
		built	: bool
		install	: bool
		runtime	: byte[:]
		incpath	: byte[:][:]
		ldscript	: byte[:]
	;;

	type gentarg = struct
		out	: byte[:][:]
		cmd	: byte[:][:] 
	;;

	type targ = union
		`Bin	myrtarg#
		`Lib	myrtarg#
		`Test	myrtarg#
		`Gen	gentarg#
		`Sub	byte[:][:]
		`Man	byte[:][:]
	;;
;;