void cpp_eval(char *buf) { FILE *fp = fmemopen(buf, strlen(buf), "r"); set_input_file("(eval)", NULL, fp); List *toplevels = read_toplevels(); for (Iter *i = list_iter(toplevels); !iter_end(i);) emit_toplevel(iter_next(i)); }
void cpp_eval(char *buf) { stream_stash(make_file_string(buf)); Vector *toplevels = read_toplevels(); for (int i = 0; i < vec_len(toplevels); i++) emit_toplevel(vec_get(toplevels, i)); stream_unstash(); }