Annex A of 5th Edition

Yusuke Suzuki utatane.tea at gmail.com
Thu Aug 30 00:57:08 PDT 2012


Hello Joseph

A.3
> UnaryExpression:
> As written, it is suggested that the following is legal (which seems
> illegal):
> ++++++++5;
> ++typeof++5;


I think it shoud raise ReferenceError (in ES5) or SyntaxError (in ES6)

in ES5
because of section 16 Errors

Attempts to call PutValue on any value for which an early determination can
> be made that the value is not a Reference (for example, executing the
> assignment statement 3=4).


http://code.google.com/p/esprima/issues/detail?id=81 is also interesting
resource

in ES6
because of section 11.13 Assignment Operators
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-11.13
Static Semantics: Early Errors

Because example expression isn't Identifier, ArrayPattern or ObjectPattern,
so early Syntax Error should be raised.

If I missed something, please point out.

Regards,
Yusuke Suzuki

On Thu, Aug 30, 2012 at 3:40 PM, Joseph Spencer <
js.developer.undefined at gmail.com> wrote:

> Hello All,
>
> This is my very first posting to this group!!!  I'm very excited to be a
> part of ECMAScript development, even if it be minute.
>
> My intention in sending this came about while writing an ECMAScript
> build tool and reading through the Production definitions of the
> language outlined in Annex A of ECMAScript 5th Edition.
>
> A.4
> ExpressionStatement:
> Is the prevention of the token { an error in this context?  Initially I
> thought it was to give parse flow over to the Block Production, until I
> realized that the following 'should' be a valid ExpressionStatement:
> {a:5}?5:4;
>
> A.3
> UnaryExpression:
> As written, it is suggested that the following is legal (which seems
> illegal):
> ++++++++5;
> ++typeof++5;
>
> Please forgive me if my findings are false, and advise where my
> understanding is lacking.
>
> -Joseph Spencer
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120830/678d77f9/attachment.html>


More information about the es-discuss mailing list