RegExp Flags

Kevin Smith zenparsing at
Mon Apr 1 21:22:57 PDT 2013

SM and v8 exhibit different behavior when evaluating the following:

false ? /abc/ii : 0;

In v8, no syntax error is thrown, presumably because regular expression
flags are only validated when a RegExp object is created.  In SM, a syntax
error is thrown because flag validation is performed by the scanner.

The current spec seems to lean toward the v8 interpretation.  Thoughts?

{ Kevin }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list