Skip to content

Commit

Permalink
Normative: Add missing static and runtime semantics when 'await' is u…
Browse files Browse the repository at this point in the history
…sed as an identifier
  • Loading branch information
anba authored and bterlson committed Feb 4, 2017
1 parent c90286d commit 18e18cf
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -10825,6 +10825,18 @@ <h1>Static Semantics: Early Errors</h1>
It is a Syntax Error if the code matched by this production is contained in strict mode code.
</li>
</ul>
<emu-grammar>
IdentifierReference : `await`

BindingIdentifier : `await`

LabelIdentifier : `await`
</emu-grammar>
<ul>
<li>
It is a Syntax Error if the goal symbol of the syntactic grammar is |Module|.
</li>
</ul>
<emu-grammar>
IdentifierReference[Yield, Await] : Identifier

Expand Down Expand Up @@ -10866,6 +10878,10 @@ <h1>Static Semantics: BoundNames</h1>
<emu-alg>
1. Return a new List containing `"yield"`.
</emu-alg>
<emu-grammar>BindingIdentifier : `await`</emu-grammar>
<emu-alg>
1. Return a new List containing `"await"`.
</emu-alg>
</emu-clause>

<!-- es6num="12.1.3" -->
Expand All @@ -10881,6 +10897,10 @@ <h1>Static Semantics: IsValidSimpleAssignmentTarget</h1>
<emu-alg>
1. Return *true*.
</emu-alg>
<emu-grammar>IdentifierReference : `await`</emu-grammar>
<emu-alg>
1. Return *true*.
</emu-alg>
</emu-clause>

<!-- es6num="12.1.4" -->
Expand All @@ -10897,6 +10917,16 @@ <h1>Static Semantics: StringValue</h1>
<emu-alg>
1. Return `"yield"`.
</emu-alg>
<emu-grammar>
IdentifierReference : `await`

BindingIdentifier : `await`

LabelIdentifier : `await`
</emu-grammar>
<emu-alg>
1. Return `"await"`.
</emu-alg>
<emu-grammar>Identifier : IdentifierName but not ReservedWord</emu-grammar>
<emu-alg>
1. Return the StringValue of |IdentifierName|.
Expand All @@ -10920,6 +10950,10 @@ <h1>Runtime Semantics: BindingInitialization</h1>
<emu-alg>
1. Return ? InitializeBoundName(`"yield"`, _value_, _environment_).
</emu-alg>
<emu-grammar>BindingIdentifier : `await`</emu-grammar>
<emu-alg>
1. Return ? InitializeBoundName(`"await"`, _value_, _environment_).
</emu-alg>

<!-- es6num="12.1.5.1" -->
<emu-clause id="sec-initializeboundname" aoid="InitializeBoundName">
Expand Down Expand Up @@ -10948,6 +10982,10 @@ <h1>Runtime Semantics: Evaluation</h1>
<emu-alg>
1. Return ? ResolveBinding(`"yield"`).
</emu-alg>
<emu-grammar>IdentifierReference : `await`</emu-grammar>
<emu-alg>
1. Return ? ResolveBinding(`"await"`).
</emu-alg>
<emu-note>
<p>The result of evaluating an |IdentifierReference| is always a value of type Reference.</p>
</emu-note>
Expand Down

0 comments on commit 18e18cf

Please sign in to comment.