Skip to content

Commit

Permalink
Editorial: Define Evaluation for BindingIdentifier
Browse files Browse the repository at this point in the history
PR tc39#614 defined (in Annex B) an additional form for ForInOfStatement.
Performing ForInOfLoopEvaluation on it ends with a call to ForIn/OfBodyEvaluation,
with |BindingIdentifier| as first arg, passed to the _lhs_ param.
ForIn/OfBodyEvaluation (at step 6.g.i.1) evaluates this param,
but there's no definition of Evaluation for |BindingIdentifier|.
This PR adds the necessary definition.

(The new definition basically just duplicates the one for ForBinding.
In fact, if this part of Annex B is merged into the main spec,
the definition for ForBinding can be dropped,
since it can just chain to this new definition.)
  • Loading branch information
jmdyck committed May 9, 2021
1 parent c754979 commit 3783a69
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -42064,6 +42064,17 @@ <h1>Initializers in ForIn Statement Heads</h1>
1. Let _keyResult_ be ? ForIn/OfHeadEvaluation(&laquo; &raquo;, |Expression|, ~enumerate~).
1. Return ? ForIn/OfBodyEvaluation(|BindingIdentifier|, |Statement|, _keyResult_, ~enumerate~, ~varBinding~, _labelSet_).
</emu-alg>
<p>The runtime semantics of Evaluation are augmented with the following:</p>
<emu-grammar>
BindingIdentifier :
Identifier
`yield`
`await`
</emu-grammar>
<emu-alg>
1. Let _bindingId_ be StringValue of |BindingIdentifier|.
1. Return ? ResolveBinding(_bindingId_).
</emu-alg>
</emu-annex>

<emu-annex id="sec-IsHTMLDDA-internal-slot">
Expand Down

0 comments on commit 3783a69

Please sign in to comment.