Disassembler skeleton

This commit is contained in:
Ian Gulliver
2021-11-19 20:38:56 -10:00
parent 5ccf6832c8
commit 579ddab2de
7 changed files with 111 additions and 6 deletions

View File

@@ -21,7 +21,11 @@ func Assemble(src []byte) (*vm.Program, error) {
return nil, errors.Wrapf(err, "At function index %d\n", f)
}
ret.Functions = append(ret.Functions, instrs)
newFunc := &vm.Function{
Instructions: instrs,
}
ret.Functions = append(ret.Functions, newFunc)
}
return ret, nil