Hey ES6ers,

I'm currently implementing some of the ES6 support for the next version of 
TypeScript.  The part I'm looking at right now is generators and yield 
expressions.  So far we feel fairly comfortable with the grammar and understand 
the implications of the [Yield] and [GeneratorParameter].  One spec issue that 
is getting us to scratch our heads though is this section:

When the production
ArrowParameters[Yield] : 
CoverParenthesizedExpressionAndArrowParameterList[?Yield]

is recognized the following grammar is used to refine the interpretation of
CoverParenthesizedExpressionAndArrowParameterList:

ArrowFormalParameters[Yield, GeneratorParameter] :
    ( StrictFormalParameters[?Yield, ?GeneratorParameter] )

The issue relates to the [GeneratorParamater] parameter on 
ArrowFormalParameters.  We can't see any path through the grammar that could 
ever end up enabling this parameter.  While 
CoverParenthesizedExpressionAndArrowParameterList picks up the 'yield' 
parameter from ArrowParameters, there seems to be nothing related to 
'GeneratorParameter'.

We also find the presence of this grammar parameter here to be somewhat odd as 
arrow function can't be generators.

Is this an issue with the spec?  Or is there some subtlety here that we've 
missed that enables this parameter?

Thanks!

            -- Cyrus
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to