SYNTAX BUG

liorean liorean at gmail.com
Tue Oct 16 06:49:29 PDT 2007


On 16/10/2007, Eugen.Konkov at aldec.com <Eugen.Konkov at aldec.com> wrote:
> In the next line there is ambigious between RegEx and comment
> str.match(//);

Not really. // is always a line comment starter in ES3:
~~~~~~~~
7.8.5 Regular Expression Literals

/- - -/

NOTE Regular expression literals may not be empty; instead of
representing an empty regular expression literal, the characters //
start a single-line comment. To specify an empty regular expression,
use /(?:)/.
~~~~~~~~
-- 
David "liorean" Andersson



More information about the Es4-discuss mailing list