3VI66VFUQO446PIYLJOHF4XDI6XSFJ7DDF3VMHGBUKZ2JO63LFCQC
QKINOUCX22BZWA3VONV4J3KKR63EOVNJAGUUNXKGRHGHLPD7R77QC
OIHG72BUOXN34ADCCDYTCNB3QDCLDWB7EA2XXLIXY254VVITRWZAC
IJGLKQESD33Y7UIM7U67M5MFJ4U2RZ5SS5PRBJJBKD2LCW7EJ35AC
DEBUG :: true
new_vm :: proc(code: []syn.TOKEN) -> ^VM {
new_vm :: proc() -> ^VM { when DEBUG { fmt.println("Created VM") }
new_vm :: proc() -> ^VM {
when DEBUG {
fmt.println("Created VM")
}
vm.code = code
}load_code :: proc(vm: ^VM, code: []syn.TOKEN) { vm.code = code
load_code :: proc(vm: ^VM, code: []syn.TOKEN) {
when DEBUG { fmt.println("Deleted VM") }
fmt.println("Deleted VM")
DEBUG :: false
my_vm := vm.new_vm() defer vm.delete_vm(my_vm)
my_vm := vm.new_vm()
defer vm.delete_vm(my_vm)
// catch quit or exit if src == "quit" || src == "exit" { break }
// catch quit or exit
if src == "quit" || src == "exit" {
break
when DEBUG { lex.print_ast(tokens) fmt.println("========") }
lex.print_ast(tokens)
fmt.println("========")
when DEBUG { lex.print_ast(ast) }
lex.print_ast(ast)
my_vm := vm.new_vm(ast[:]) defer vm.delete_vm(my_vm)
my_vm := vm.new_vm(ast[:])
vm.load_code(my_vm, ast[:])