+void Run(const char *code, FILE *fout) { _pooled
+ JSStringRef script(JSStringCreateWithUTF8CString(code));
+
+ JSContextRef context(CYGetJSContext());
+
+ JSValueRef exception(NULL);
+ JSValueRef result(JSEvaluateScript(context, script, NULL, NULL, 0, &exception));
+ JSStringRelease(script);
+
+ if (exception != NULL) { error:
+ result = exception;
+ exception = NULL;
+ }
+
+ if (!JSValueIsUndefined(context, result)) {
+ CYPool pool;
+ const char *json;
+
+ json = CYPoolJSONString(pool, context, result, &exception);
+ if (exception != NULL)
+ goto error;
+
+ if (fout != NULL) {
+ fputs(json, fout);
+ fputs("\n", fout);
+ fflush(fout);
+ }
+ }
+}
+
+void Console() {
+ bool bypass(false);
+ bool debug(false);
+