"\08" is ill formed in ECMA262
mathias at qiwi.be
Sat Jun 8 12:43:11 PDT 2013
On 8 Jun 2013, at 19:01, Yusuke SUZUKI <utatane.tea at gmail.com> wrote:
> Hello all,
> Seeing ECMA262 section 7.8.4,
> EscapeSequence ::
> 0 [lookahead ∉ DecimalDigit]
> Because of "[lookahead ∉ DecimalDigit]", strictly speaking, "\08" / "\09" is ill formed StringLiteral.
> But engines in the wild, V8, SpiderMonkey, JSC accepts this form and recognize it as "\x008".
> To bridege the gap, I think it is better to introduce this form to the spec officially.
Agreed. Let’s loosen the restriction to octal digits only, to match reality.
Filed a bug: https://bugs.ecmascript.org/show_bug.cgi?id=1553
More information about the es-discuss