d846046c4a
Compiler and VM are now working well enough to support larger programs. A test program is included and executed immediately upon running the executable. A more feature complete read-eval-print loop is planned.
18 lines
284 B
OCaml
18 lines
284 B
OCaml
|
|
(* This file implements native functions of the VM runtime.
|
|
Stuff like printing to the screen, file I/O etc will be implemented
|
|
here.
|
|
*)
|
|
open Types
|
|
|
|
let builtin_print (v : Types.value) =
|
|
print_endline (print_value v);
|
|
Types.Nil
|
|
|
|
let table = [|
|
|
builtin_print
|
|
|]
|
|
|
|
|
|
|