Hmm... well.. even a c style script interpreter isn't hard. Every type would map to a composite type that has a value, or null.. all the functions are easy to map. Then you take said interpreter and make it write out byte code in a 2-pass fashion, write out the ASM. It'd be easier than writing it in ASM, but a hella lot slower :)