void run_repl_stdin(World* world) { Stack* stack = alloc_stack(world); repl_start(stack); printf("Started REPL, type /help for reference.\n"); while (true) { Value input; // Get next line if (!circa_get_line(&input)) break; // Before doing any work, process any pending file changes. file_watch_check_all(world); Value output; repl_run_line(stack, &input, &output); for (int i=0; i < list_length(&output); i++) std::cout << as_cstring(list_get(&output, i)) << std::endl; // Check if we've finished. if (top_frame(stack) == NULL) return; } }
void world_tick(caWorld* world) { file_watch_check_all(world); #if CIRCA_ENABLE_LIBUV libuv_process_events(world->libuvWorld); #endif }