Skip to content

Commit

Permalink
Coalesce IterationStatement static semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyGu committed Aug 10, 2018
1 parent 7eb0a0e commit 86aab89
Showing 1 changed file with 10 additions and 44 deletions.
54 changes: 10 additions & 44 deletions spec.html
Expand Up @@ -16462,30 +16462,21 @@ <h1>Static Semantics: IsDestructuring</h1>
<emu-clause id="sec-for-in-and-for-of-statements-static-semantics-vardeclarednames">
<h1>Static Semantics: VarDeclaredNames</h1>
<emu-see-also-para op="VarDeclaredNames"></emu-see-also-para>
<emu-grammar>IterationStatement : `for` `(` LeftHandSideExpression `in` Expression `)` Statement</emu-grammar>
<emu-alg>
1. Return the VarDeclaredNames of |Statement|.
</emu-alg>
<emu-grammar>IterationStatement : `for` `(` `var` ForBinding `in` Expression `)` Statement</emu-grammar>
<emu-alg>
1. Let _names_ be the BoundNames of |ForBinding|.
1. Append to _names_ the elements of the VarDeclaredNames of |Statement|.
1. Return _names_.
</emu-alg>
<emu-grammar>IterationStatement : `for` `(` ForDeclaration `in` Expression `)` Statement</emu-grammar>
<emu-alg>
1. Return the VarDeclaredNames of |Statement|.
</emu-alg>
<emu-grammar>
IterationStatement :
`for` `(` LeftHandSideExpression `in` Expression `)` Statement
`for` `(` LeftHandSideExpression `of` AssignmentExpression `)` Statement
`for` `await` `(` LeftHandSideExpression `of` AssignmentExpression `)` Statement
`for` `(` ForDeclaration `in` Expression `)` Statement
`for` `(` ForDeclaration `of` AssignmentExpression `)` Statement
`for` `await` `(` ForDeclaration `of` AssignmentExpression `)` Statement
</emu-grammar>
<emu-alg>
1. Return the VarDeclaredNames of |Statement|.
</emu-alg>
<emu-grammar>
IterationStatement :
`for` `(` `var` ForBinding `in` Expression `)` Statement
`for` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
`for` `await` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
</emu-grammar>
Expand All @@ -16494,14 +16485,6 @@ <h1>Static Semantics: VarDeclaredNames</h1>
1. Append to _names_ the elements of the VarDeclaredNames of |Statement|.
1. Return _names_.
</emu-alg>
<emu-grammar>
IterationStatement :
`for` `(` ForDeclaration `of` AssignmentExpression `)` Statement
`for` `await` `(` ForDeclaration `of` AssignmentExpression `)` Statement
</emu-grammar>
<emu-alg>
1. Return the VarDeclaredNames of |Statement|.
</emu-alg>
<emu-note>
<p>This section is extended by Annex <emu-xref href="#sec-initializers-in-forin-statement-heads"></emu-xref>.</p>
</emu-note>
Expand All @@ -16510,30 +16493,21 @@ <h1>Static Semantics: VarDeclaredNames</h1>
<emu-clause id="sec-for-in-and-for-of-statements-static-semantics-varscopeddeclarations">
<h1>Static Semantics: VarScopedDeclarations</h1>
<emu-see-also-para op="VarScopedDeclarations"></emu-see-also-para>
<emu-grammar>IterationStatement : `for` `(` LeftHandSideExpression `in` Expression `)` Statement</emu-grammar>
<emu-alg>
1. Return the VarScopedDeclarations of |Statement|.
</emu-alg>
<emu-grammar>IterationStatement : `for` `(` `var` ForBinding `in` Expression `)` Statement</emu-grammar>
<emu-alg>
1. Let _declarations_ be a List containing |ForBinding|.
1. Append to _declarations_ the elements of the VarScopedDeclarations of |Statement|.
1. Return _declarations_.
</emu-alg>
<emu-grammar>IterationStatement : `for` `(` ForDeclaration `in` Expression `)` Statement</emu-grammar>
<emu-alg>
1. Return the VarScopedDeclarations of |Statement|.
</emu-alg>
<emu-grammar>
IterationStatement :
`for` `(` LeftHandSideExpression `in` Expression `)` Statement
`for` `(` LeftHandSideExpression `of` AssignmentExpression `)` Statement
`for` `await` `(` LeftHandSideExpression `of` AssignmentExpression `)` Statement
`for` `(` ForDeclaration `in` Expression `)` Statement
`for` `(` ForDeclaration `of` AssignmentExpression `)` Statement
`for` `await` `(` ForDeclaration `of` AssignmentExpression `)` Statement
</emu-grammar>
<emu-alg>
1. Return the VarScopedDeclarations of |Statement|.
</emu-alg>
<emu-grammar>
IterationStatement :
`for` `(` `var` ForBinding `in` Expression `)` Statement
`for` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
`for` `await` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
</emu-grammar>
Expand All @@ -16542,14 +16516,6 @@ <h1>Static Semantics: VarScopedDeclarations</h1>
1. Append to _declarations_ the elements of the VarScopedDeclarations of |Statement|.
1. Return _declarations_.
</emu-alg>
<emu-grammar>
IterationStatement :
`for` `(` ForDeclaration `of` AssignmentExpression `)` Statement
`for` `await` `(` ForDeclaration `of` AssignmentExpression `)` Statement
</emu-grammar>
<emu-alg>
1. Return the VarScopedDeclarations of |Statement|.
</emu-alg>
<emu-note>
<p>This section is extended by Annex <emu-xref href="#sec-initializers-in-forin-statement-heads"></emu-xref>.</p>
</emu-note>
Expand Down

0 comments on commit 86aab89

Please sign in to comment.