js_ReportCompileErrorNumber(cx, ts, NULL, JSREPORT_ERROR, JSMSG_SYNTAX_ERROR);
js_ReportCompileErrorNumber(cx, ts, JSREPORT_ERROR, JSMSG_SYNTAX_ERROR);
JS_FRIEND_API(JSBool)js_CompileTokenStream(JSContext *cx, JSObject *chain, JSTokenStream *ts,                      JSCodeGenerator *cg){    JSStackFrame *fp, frame;    JSBool ok;    JSParseNode *pn;    fp = cx->fp;    if (!fp || fp->varobj != chain || fp->scopeChain != chain) {        memset(&frame, 0, sizeof frame);        frame.varobj = frame.scopeChain = chain;        frame.down = fp;        cx->fp = &frame;    }    /*     * Prevent GC activation on this context (possible if out of memory when     * atomizing, or from pre-ECMAv2 switch case expr eval in the unlikely     * case of a branch-callback -- unlikely because it means the switch case     * must have called a function).     */    JS_DISABLE_GC(cx->runtime);    pn = Statements(cx, ts, &cg->treeContext);    if (!pn) {        ok = JS_FALSE;    } else if (!js_MatchToken(cx, ts, TOK_EOF)) {        js_ReportCompileErrorNumber(cx, ts, NULL, JSREPORT_ERROR,                                    JSMSG_SYNTAX_ERROR);        ok = JS_FALSE;    } else {        pn->pn_type = TOK_LC;        ok = js_FoldConstants(cx, pn) &&             js_AllocTryNotes(cx, cg) &&             js_EmitTree(cx, cg, pn);    }    JS_ENABLE_GC(cx->runtime);    cx->fp = fp;    return ok;}