#include "compiler.h" #include "rlib.h" #include #include #include #include void rrex_compiler_repl() { rclear(); printf("Type expression to convert bytecode to human readable format.\n"); while (true) { rprintb("> "); char line[8096]; rreadline(line, sizeof(line), true); if (!line) continue; char bdata[sizeof(line) * 2]; rprint("\\t"); rrex_compile(line, bdata); rprinty("< "); print_bc(bdata); rprint("\n"); } } int main() { rrex_compiler_tests(); printf("%s\n", "Executed all compiler tests at boot of this application."); rrex_compiler_repl(); return 0; }