Reorganized file structure

This commit is contained in:
Eduard Urbach 2024-06-10 15:51:39 +02:00
parent 8b595ef3ce
commit 722d07c321
Signed by: eduard
GPG key ID: 49226B848C78F6C8
57 changed files with 431 additions and 614 deletions

17
src/build/Finalize.go Normal file
View file

@ -0,0 +1,17 @@
package build
import (
"git.akyoto.dev/cli/q/src/build/asm"
)
// Finalize generates the final machine code.
func Finalize(functions map[string]*Function) ([]byte, []byte) {
a := asm.New()
for _, f := range functions {
a.Merge(&f.Assembler)
}
code, data := a.Finalize()
return code, data
}