int main(int argc, char* argv[]) { init_interpreter(); if (argc == 1) repl_loop(); else if (argc == 2) return interpret_main(argv[1]); else { printf("Takes an argument or no argument"); return 0; } return 0; }
static void error (repl_session_t *sess, char *err) { fprintf(sess->stderr, "error: '%s'\n", err); repl_loop(sess); }
static void print (repl_session_t *sess, char *buf) { fprintf(sess->stdout, "%s\n", buf); repl_loop(sess); }