default: JS_ReportError(cx, "invalid regular expression flag %c", (char) *cp);
default: { char charBuf[2] = " "; charBuf[0] = (char)*cp; JS_ReportErrorNumber(cx, NULL, JSMSG_BAD_FLAG, charBuf);
js_NewRegExpOpt(JSContext *cx, JSString *str, JSString *opt){    uintN flags;    jschar *cp;    flags = 0;    if (opt) {	for (cp = opt->chars; *cp; cp++) {	    switch (*cp) {	      case 'g':		flags |= JSREG_GLOB;		break;	      case 'i':		flags |= JSREG_FOLD;		break;	      default:		JS_ReportError(cx, "invalid regular expression flag %c",			       (char) *cp);		return NULL;	    }	}    }    return js_NewRegExp(cx, str, flags);}