Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upShould the note about restricted productions include expressionless 'yield'? #1192
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
littledan
May 11, 2018
Member
@DanielRosenwasser I agree that we should document it similarly. PRs are welcome. cc @bmeck
|
@DanielRosenwasser I agree that we should document it similarly. PRs are welcome. cc @bmeck |
ljharb
added
editorial change
good first patch
labels
May 11, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Yes we should probably document this. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
allenwb
May 11, 2018
Member
I'm less sure.
The origin of this text dates all the way back to ES1 when there were only three restricted productions in the language. In that context it probably made sense to list them there. But now that the list is long and growing, it's less clear that a redundant list makes sense. Redundant non-normative lists have perennially had the problem of getting out of date. Yet people tend to read them as if they are complete and normative.
My suggestion is that instead of trying to list all of the restricted production, to either delete the entire note, or to change it into providing a clarifying example of a single restricted production.
|
I'm less sure. The origin of this text dates all the way back to ES1 when there were only three restricted productions in the language. In that context it probably made sense to list them there. But now that the list is long and growing, it's less clear that a redundant list makes sense. Redundant non-normative lists have perennially had the problem of getting out of date. Yet people tend to read them as if they are complete and normative. My suggestion is that instead of trying to list all of the restricted production, to either delete the entire note, or to change it into providing a clarifying example of a single restricted production. |
DanielRosenwasser
referenced a pull request that will
close
this issue
May 12, 2018
Open
Added 'yield' example for line terminator grammar restrictions. #1193
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bterlson
May 14, 2018
Member
I think we can keep this up to date personally. Since the grammar annex is auto-generated, it's a simple ctrl+F for restricted productions :)
|
I think we can keep this up to date personally. Since the grammar annex is auto-generated, it's a simple ctrl+F for restricted productions :) |
DanielRosenwasser commentedMay 10, 2018
In https://tc39.github.io/ecma262/#sec-rules-of-automatic-semicolon-insertion, the noted restricted productions are not complete, but notice that
is documented, but not
I believe the idea is just to illustrate the two possible conditions where an expression may or may not be present, so I think
yieldshould be documented the same.