Skip to content

Commit

Permalink
Editorial: Correct usage of 'Let'/'Set' in algorithms (tc39#3131)
Browse files Browse the repository at this point in the history
  • Loading branch information
kimjg1119 authored and ljharb committed Aug 4, 2023
1 parent e519fc4 commit c316ec7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -23928,7 +23928,7 @@ <h1>Runtime Semantics: Evaluation</h1>
1. Assert: _received_.[[Type]] is ~return~.
1. Let _return_ be ? GetMethod(_iterator_, *"return"*).
1. If _return_ is *undefined*, then
1. Let _value_ be _received_.[[Value]].
1. Set _value_ to _received_.[[Value]].
1. If _generatorKind_ is ~async~, then
1. Set _value_ to ? Await(_value_).
1. Return Completion Record { [[Type]]: ~return~, [[Value]]: _value_, [[Target]]: ~empty~ }.
Expand All @@ -23937,7 +23937,7 @@ <h1>Runtime Semantics: Evaluation</h1>
1. If _innerReturnResult_ is not an Object, throw a *TypeError* exception.
1. Let _done_ be ? IteratorComplete(_innerReturnResult_).
1. If _done_ is *true*, then
1. Let _value_ be ? IteratorValue(_innerReturnResult_).
1. Set _value_ to ? IteratorValue(_innerReturnResult_).
1. Return Completion Record { [[Type]]: ~return~, [[Value]]: _value_, [[Target]]: ~empty~ }.
1. If _generatorKind_ is ~async~, set _received_ to Completion(AsyncGeneratorYield(? IteratorValue(_innerReturnResult_))).
1. Else, set _received_ to Completion(GeneratorYield(_innerReturnResult_)).
Expand Down Expand Up @@ -25327,11 +25327,11 @@ <h1>
<emu-grammar>CaseBlock : `{` CaseClauses? DefaultClause CaseClauses? `}`</emu-grammar>
<emu-alg>
1. Let _has_ be *false*.
1. If the first |CaseClauses| is present, let _has_ be HasCallInTailPosition of the first |CaseClauses| with argument _call_.
1. If the first |CaseClauses| is present, set _has_ to HasCallInTailPosition of the first |CaseClauses| with argument _call_.
1. If _has_ is *true*, return *true*.
1. Let _has_ be HasCallInTailPosition of |DefaultClause| with argument _call_.
1. Set _has_ to HasCallInTailPosition of |DefaultClause| with argument _call_.
1. If _has_ is *true*, return *true*.
1. If the second |CaseClauses| is present, let _has_ be HasCallInTailPosition of the second |CaseClauses| with argument _call_.
1. If the second |CaseClauses| is present, set _has_ to HasCallInTailPosition of the second |CaseClauses| with argument _call_.
1. Return _has_.
</emu-alg>
<emu-grammar>CaseClauses : CaseClauses CaseClause</emu-grammar>
Expand Down

0 comments on commit c316ec7

Please sign in to comment.