Big changes:
ci/woodpecker/push/debian Pipeline was successful
ci/woodpecker/push/nix Pipeline was successful
ci/woodpecker/push/fedora Pipeline was successful
ci/woodpecker/push/publish Pipeline was successful

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.
This commit is contained in:
2026-04-26 00:55:43 +03:00
parent 0925b44ef7
commit d846046c4a
10 changed files with 52 additions and 102 deletions
+2 -11
View File
@@ -4,18 +4,9 @@
here.
*)
open Types
let builtin_print (v : Types.value) =
let p = Printf.sprintf in
let rec aux_print = function
| Int x -> p "%d" x
| Double x -> p "%f" x
| String x -> p "\"%s\"" x
| Nil -> p "'()"
| Cons (a, b) -> p "(%s . %s)" (aux_print a) (aux_print b)
| Symbol x -> p "'%s" x
| Closure (i, _) -> p "<closure %d>" i
| Native i -> p "<native %d>" i in
print_endline (aux_print v);
print_endline (print_value v);
Types.Nil
let table = [|