Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: Add assertion that generatorKind is not non-generator #3379

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -24084,6 +24084,7 @@ <h1>Runtime Semantics: Evaluation</h1>
<emu-grammar>YieldExpression : `yield` `*` AssignmentExpression</emu-grammar>
<emu-alg>
1. Let _generatorKind_ be GetGeneratorKind().
1. Assert: _generatorKind_ is not ~non-generator~.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is correct. However, rather than the double negative of "not non-generator", it might be clearer to make the positive assertion:

Suggested change
1. Assert: _generatorKind_ is not ~non-generator~.
1. Assert: _generatorKind_ is either ~sync~ or ~async~.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you. Thanks for making this clearer.

1. Let _exprRef_ be ? Evaluation of |AssignmentExpression|.
1. Let _value_ be ? GetValue(_exprRef_).
1. Let _iteratorRecord_ be ? GetIterator(_value_, _generatorKind_).
Expand Down
Loading