Directive prologue members, escapes, and retroactive syntax errors

Peter van der Zee ecma at
Sun Oct 17 00:32:17 PDT 2010

Exactly. But because the only side-effect would be the not-throwing of an error 
if a directive did contain an octal, I would think this was a proper solution to 
the problem presented. Especially since ignoring that rule for directives would 
have zero side effects for the execution of that code.

> On Oct 16, 2010, at 12:36 PM, Peter van der Zee wrote:
>> The only question is whether or not an
>> error should be thrown due to strict mode. My suggestion was to
>> ignore any strict mode rules while parsing string-literal
>> "statements" (not part of a more complex expression) at the start
>> of a Program.
> ES5 7.8.4 (last paragraph, before the NOTE) seems clear on this, it
> does not allow your suggestion as an option.
> Yeah, we could defy the spec in this odd corner case. Who really
> cares? Still, if we implementors all do, the spec should be amended
> when convenient.
> /be

More information about the es5-discuss mailing list