generated from tc39/template-for-proposals
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Hi, while implementing function.sent support in Babel I got a doubt: is this code valid?
function* foo() {
function.sent;
}The current specification disallows it (an ExpressionStatement can't start with function):
https://tc39.github.io/ecma262/#prod-ExpressionStatement
ExpressionStatement[Yield, Await]:
[lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] Expression[+In, ?Yield, ?Await] ;
I couldn't find in this proposal a relaxation of that grammar, but I don't see why it should be disallowed.
Metadata
Metadata
Assignees
Labels
No labels