scm-to-vm/reference/scheme.c

26 lines
292 B
C

#include "gc.h"
#include "runtime.h"
void prompt() {
printf("> ");
}
int repl() {
box_t res;
do {
prompt();
box_t in = read();
res = eval(in);
scm_print(res);
printf("\n");
} while (res.type != BYE);
return 0;
}
int main() {
gc_init();
return repl();
}