Unifying Block and ObjectLiteral (was: Re: block-lambda revival)

Brendan Eich brendan at mozilla.com
Thu Jun 30 21:46:38 PDT 2011


On Jun 30, 2011, at 8:56 PM, Mike Samuel wrote:

> 2011/6/30 Brendan Eich <brendan at mozilla.com>:
>> On Jun 30, 2011, at 6:32 PM, Mike Samuel wrote:
>> 
>> 2011/6/28 Brendan Eich <brendan at mozilla.com>:
>> No, remember I wrote "We'd still need the [lookahead ∉
>> {{, function}] restriction in ExpressionStatement."
> 
> Ok, then by this redefinition of Block,
>    if (foo()) {}
> is not a valid program because it is not possible for a Block to not
> contain any statements.  Neither UnlabeledStatementFirstList nor
> WellLabeledStatement match the empty string.

Oops -- thanks. I will fix in a strawman that captures all of this.

/be



More information about the es-discuss mailing list