archives

« Bugzilla Issues Index

#4059 — 14.4 Generator Function Definitions: Remove [Yield] parameter from GeneratorBody


14.4 Generator Function Definitions

[Yield] is always present for generators, so the grammar can be simplified to:

GeneratorMethod[Yield] :
* PropertyName[?Yield] (StrictFormalParameters[Yield,GeneratorParameter] ) { GeneratorBody }

GeneratorDeclaration[Yield, Default] :
function * BindingIdentifier[?Yield] ( FormalParameters[Yield,GeneratorParameter] ) { GeneratorBody }
[+Default] function * ( FormalParameters[Yield,GeneratorParameter] ) { GeneratorBody }

GeneratorExpression :
function * BindingIdentifier[Yield]opt ( FormalParameters[Yield,GeneratorParameter] ) { GeneratorBody }

GeneratorBody :
FunctionBody[Yield]


So basically changing `GeneratorBody[Yield]` to just `GeneratorBody` and `FunctionBody[?Yield]` to `FunctionBody`.


And change 19.2.1.1.1 RuntimeSemantics: CreateDynamicFunction(constructor, newTarget, kind, args) step 3.a to:
> Let goal be the grammar symbol GeneratorBody.


fixed in rev35 editor's draft


fixed in rev35