Skip to content

Commit

Permalink
Fix ambiguity for productions.
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRosenwasser committed Nov 13, 2019
1 parent 767a880 commit af15638
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -13922,7 +13922,7 @@ <h1>Runtime Semantics: Evaluation</h1>
1. Let _baseValue_ be ? GetValue(_baseReference_).
1. If _baseValue_ is *undefined* or *null*, then
1. Return *undefined*.
1. Let _optionalChain_ be this |OptionalChain|.
1. Let _optionalChain_ be |OptionalChain|.
1. Return the result of performing ChainEvaluation of _optionalChain_ with arguments _baseValue_ and _baseReference_.
</emu-alg>
<emu-grammar>
Expand All @@ -13935,7 +13935,7 @@ <h1>Runtime Semantics: Evaluation</h1>
1. Let _baseValue_ be ? GetValue(_baseReference_).
1. If _baseValue_ is *undefined* or *null*, then
1. Return *undefined*.
1. Let _optionalChain_ be this |OptionalChain|.
1. Let _optionalChain_ be |OptionalChain|.
1. Return ? _optionalChain_.ChainEvaluation(_baseValue_, _baseReference_).
</emu-alg>
<emu-grammar>
Expand All @@ -13948,7 +13948,7 @@ <h1>Runtime Semantics: Evaluation</h1>
1. Let _baseValue_ be ? GetValue(_baseReference_).
1. If _baseValue_ is *undefined* or *null*, then
1. Return *undefined*.
1. Let _optionalChain_ be this |OptionalChain|.
1. Let _optionalChain_ be |OptionalChain|.
1. Return ? _optionalChain_.ChainEvaluation(_baseValue_, _baseReference_).
</emu-alg>
</emu-clause>
Expand All @@ -13957,42 +13957,42 @@ <h1>Runtime Semantics: ChainEvaluation</h1>
<p>With parameters _baseValue_ and _baseReference_.</p>
<emu-grammar>OptionalChain : `?.` `[` Expression `]`</emu-grammar>
<emu-alg>
1. If the code matched by this production is strict mode code, let _strict_ be *true*, else let _strict_ be *false*.
1. If the code matched by this |OptionalChain| is strict mode code, let _strict_ be *true*, else let _strict_ be *false*.
1. Return ? EvaluateDynamicPropertyAccess(_baseValue_, |Expression|, _strict_).
</emu-alg>
<emu-grammar>OptionalChain : `?.` IdentifierName</emu-grammar>
<emu-alg>
1. If the code matched by this production is strict mode code, let _strict_ be *true*, else let _strict_ be *false*.
1. If the code matched by this |OptionalChain| is strict mode code, let _strict_ be *true*, else let _strict_ be *false*.
1. Return ? EvaluateStaticPropertyAccess(_baseValue_, |IdentifierName|, _strict_).
</emu-alg>
<emu-grammar>OptionalChain : `?.` Arguments</emu-grammar>
<emu-alg>
1. Let _thisChain_ be this production.
1. Let _thisChain_ be this |OptionalChain|.
1. Let _tailCall_ be IsInTailPosition(_thisChain_).
1. Return ? EvaluateCall(_baseValue_, _baseReference_, |Arguments|, _tailCall_).
</emu-alg>
<emu-grammar>OptionalChain : OptionalChain `[` Expression `]`</emu-grammar>
<emu-alg>
1. Let _optionalChain_ be this |OptionalChain|.
1. Let _optionalChain_ be |OptionalChain|.
1. Let _newReference_ be ? ChainEvaluation of _optionalChain_ with arguments _baseValue_ and _baseReference_).
1. Let _newValue_ be ? GetValue(_newReference_).
1. If the code matched by this production is strict mode code, let _strict_ be *true*, else let _strict_ be *false*.
1. If the code matched by this |OptionalChain| is strict mode code, let _strict_ be *true*, else let _strict_ be *false*.
1. Return ? EvaluateDynamicPropertyAccess(_newValue_, |Expression|, _strict_).
</emu-alg>
<emu-grammar>OptionalChain : OptionalChain `.` IdentifierName</emu-grammar>
<emu-alg>
1. Let _optionalChain_ be this |OptionalChain|.
1. Let _optionalChain_ be |OptionalChain|.
1. Let _newReference_ be ? ChainEvaluation of _optionalChain_ with arguments _baseValue_ and _baseReference_.
1. Let _newValue_ be ? GetValue(_newReference_).
1. If the code matched by this production is strict mode code, let _strict_ be *true*, else let _strict_ be *false*.
1. If the code matched by this |OptionalChain| is strict mode code, let _strict_ be *true*, else let _strict_ be *false*.
1. Return ? EvaluateStaticPropertyAccess(_newValue_, |IdentifierName|, _strict_).
</emu-alg>
<emu-grammar>OptionalChain : OptionalChain Arguments</emu-grammar>
<emu-alg>
1. Let _optionalChain_ be this |OptionalChain|.
1. Let _optionalChain_ be |OptionalChain|.
1. Let _newReference_ be ? ChainEvaluation of _optionalChain_ with arguments _baseValue_ and _baseReference_.
1. Let _newValue_ be ? GetValue(_newReference_).
1. Let _thisChain_ be this production.
1. Let _thisChain_ be this |OptionalChain|.
1. Let _tailCall_ be IsInTailPosition(_thisChain_).
1. Return ? EvaluateCall(_newValue_, _newReference_, |Arguments|, _tailCall_).
</emu-alg>
Expand Down

0 comments on commit af15638

Please sign in to comment.