Skip to content

Commit

Permalink
Editorial: prefer multi-line productions when in groups
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkot committed Jan 11, 2021
1 parent bc148da commit 3073b2a
Showing 1 changed file with 89 additions and 79 deletions.
168 changes: 89 additions & 79 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -6842,41 +6842,31 @@ <h1>Static Semantics: IsConstantDeclaration</h1>
1. Return *true*.
</emu-alg>
<emu-grammar>
FunctionDeclaration : `function` BindingIdentifier `(` FormalParameters `)` `{` FunctionBody `}`

FunctionDeclaration : `function` `(` FormalParameters `)` `{` FunctionBody `}`
</emu-grammar>
<emu-alg>
1. Return *false*.
</emu-alg>
<emu-grammar>
GeneratorDeclaration : `function` `*` BindingIdentifier `(` FormalParameters `)` `{` GeneratorBody `}`
FunctionDeclaration :
`function` BindingIdentifier `(` FormalParameters `)` `{` FunctionBody `}`
`function` `(` FormalParameters `)` `{` FunctionBody `}`

GeneratorDeclaration : `function` `*` `(` FormalParameters `)` `{` GeneratorBody `}`
</emu-grammar>
<emu-alg>
1. Return *false*.
</emu-alg>
<emu-grammar>
AsyncGeneratorDeclaration : `async` `function` `*` BindingIdentifier `(` FormalParameters `)` `{` AsyncGeneratorBody `}`
GeneratorDeclaration :
`function` `*` BindingIdentifier `(` FormalParameters `)` `{` GeneratorBody `}`
`function` `*` `(` FormalParameters `)` `{` GeneratorBody `}`

AsyncGeneratorDeclaration : `async` `function` `*` `(` FormalParameters `)` `{` AsyncGeneratorBody `}`
</emu-grammar>
<emu-alg>
1. Return *false*.
</emu-alg>
<emu-grammar>
ClassDeclaration : `class` BindingIdentifier ClassTail
AsyncGeneratorDeclaration :
`async` `function` `*` BindingIdentifier `(` FormalParameters `)` `{` AsyncGeneratorBody `}`
`async` `function` `*` `(` FormalParameters `)` `{` AsyncGeneratorBody `}`

ClassDeclaration : `class` ClassTail
AsyncFunctionDeclaration :
`async` `function` BindingIdentifier `(` FormalParameters `)` `{` AsyncFunctionBody `}`
`async` `function` `(` FormalParameters `)` `{` AsyncFunctionBody `}`
</emu-grammar>
<emu-alg>
1. Return *false*.
</emu-alg>
<emu-grammar>
AsyncFunctionDeclaration : `async` `function` BindingIdentifier `(` FormalParameters `)` `{` AsyncFunctionBody `}`
ClassDeclaration :
`class` BindingIdentifier ClassTail

AsyncFunctionDeclaration : `async` `function` `(` FormalParameters `)` `{` AsyncFunctionBody `}`
ClassDeclaration :
`class` ClassTail
</emu-grammar>
<emu-alg>
1. Return *false*.
Expand Down Expand Up @@ -6913,9 +6903,11 @@ <h1>Static Semantics: ContainsDuplicateLabels</h1>
ThrowStatement
DebuggerStatement

Block : `{` `}`
Block :
`{` `}`

StatementListItem : Declaration
StatementListItem :
Declaration
</emu-grammar>
<emu-alg>
1. Return *false*.
Expand Down Expand Up @@ -7077,9 +7069,11 @@ <h1>Static Semantics: ContainsUndefinedBreakTarget</h1>
ThrowStatement
DebuggerStatement

Block : `{` `}`
Block :
`{` `}`

StatementListItem : Declaration
StatementListItem :
Declaration
</emu-grammar>
<emu-alg>
1. Return *false*.
Expand Down Expand Up @@ -7249,9 +7243,11 @@ <h1>Static Semantics: ContainsUndefinedContinueTarget</h1>
ThrowStatement
DebuggerStatement

Block : `{` `}`
Block :
`{` `}`

StatementListItem : Declaration
StatementListItem :
Declaration
</emu-grammar>
<emu-alg>
1. Return *false*.
Expand Down Expand Up @@ -18530,9 +18526,9 @@ <h2>Syntax</h2>
<emu-clause id="sec-continue-statement-static-semantics-early-errors">
<h1>Static Semantics: Early Errors</h1>
<emu-grammar>
ContinueStatement : `continue` `;`

ContinueStatement : `continue` LabelIdentifier `;`
ContinueStatement :
`continue` `;`
`continue` LabelIdentifier `;`
</emu-grammar>
<ul>
<li>
Expand Down Expand Up @@ -19374,11 +19370,12 @@ <h2>Syntax</h2>
<emu-clause id="sec-function-definitions-static-semantics-early-errors">
<h1>Static Semantics: Early Errors</h1>
<emu-grammar>
FunctionDeclaration : `function` BindingIdentifier `(` FormalParameters `)` `{` FunctionBody `}`

FunctionDeclaration : `function` `(` FormalParameters `)` `{` FunctionBody `}`
FunctionDeclaration :
`function` BindingIdentifier `(` FormalParameters `)` `{` FunctionBody `}`
`function` `(` FormalParameters `)` `{` FunctionBody `}`

FunctionExpression : `function` BindingIdentifier? `(` FormalParameters `)` `{` FunctionBody `}`
FunctionExpression :
`function` BindingIdentifier? `(` FormalParameters `)` `{` FunctionBody `}`
</emu-grammar>
<ul>
<li>
Expand Down Expand Up @@ -19446,35 +19443,48 @@ <h1>Static Semantics: HasName</h1>
1. Return HasName of _expr_.
</emu-alg>
<emu-grammar>
FunctionExpression : `function` `(` FormalParameters `)` `{` FunctionBody `}`
FunctionExpression :
`function` `(` FormalParameters `)` `{` FunctionBody `}`

GeneratorExpression : `function` `*` `(` FormalParameters `)` `{` GeneratorBody `}`
GeneratorExpression :
`function` `*` `(` FormalParameters `)` `{` GeneratorBody `}`

AsyncGeneratorExpression : `async` `function` `*` `(` FormalParameters `)` `{` AsyncGeneratorBody `}`
AsyncGeneratorExpression :
`async` `function` `*` `(` FormalParameters `)` `{` AsyncGeneratorBody `}`

AsyncFunctionExpression : `async` `function` `(` FormalParameters `)` `{` AsyncFunctionBody `}`
AsyncFunctionExpression :
`async` `function` `(` FormalParameters `)` `{` AsyncFunctionBody `}`

ArrowFunction : ArrowParameters `=>` ConciseBody
ArrowFunction :
ArrowParameters `=>` ConciseBody

AsyncArrowFunction : `async` AsyncArrowBindingIdentifier `=>` AsyncConciseBody
AsyncArrowFunction :
`async` AsyncArrowBindingIdentifier `=>` AsyncConciseBody

AsyncArrowFunction : CoverCallExpressionAndAsyncArrowHead `=>` AsyncConciseBody
AsyncArrowFunction :
CoverCallExpressionAndAsyncArrowHead `=>` AsyncConciseBody

ClassExpression : `class` ClassTail
ClassExpression :
`class` ClassTail
</emu-grammar>
<emu-alg>
1. Return *false*.
</emu-alg>
<emu-grammar>
FunctionExpression : `function` BindingIdentifier `(` FormalParameters `)` `{` FunctionBody `}`
FunctionExpression :
`function` BindingIdentifier `(` FormalParameters `)` `{` FunctionBody `}`

GeneratorExpression : `function` `*` BindingIdentifier `(` FormalParameters `)` `{` GeneratorBody `}`
GeneratorExpression :
`function` `*` BindingIdentifier `(` FormalParameters `)` `{` GeneratorBody `}`

AsyncGeneratorExpression : `async` `function` `*` BindingIdentifier `(` FormalParameters `)` `{` AsyncGeneratorBody `}`
AsyncGeneratorExpression :
`async` `function` `*` BindingIdentifier `(` FormalParameters `)` `{` AsyncGeneratorBody `}`

AsyncFunctionExpression : `async` `function` BindingIdentifier `(` FormalParameters `)` `{` AsyncFunctionBody `}`
AsyncFunctionExpression :
`async` `function` BindingIdentifier `(` FormalParameters `)` `{` AsyncFunctionBody `}`

ClassExpression : `class` BindingIdentifier ClassTail
ClassExpression :
`class` BindingIdentifier ClassTail
</emu-grammar>
<emu-alg>
1. Return *true*.
Expand Down Expand Up @@ -20102,11 +20112,12 @@ <h1>Static Semantics: Early Errors</h1>
</li>
</ul>
<emu-grammar>
GeneratorDeclaration : `function` `*` BindingIdentifier `(` FormalParameters `)` `{` GeneratorBody `}`

GeneratorDeclaration : `function` `*` `(` FormalParameters `)` `{` GeneratorBody `}`
GeneratorDeclaration :
`function` `*` BindingIdentifier `(` FormalParameters `)` `{` GeneratorBody `}`
`function` `*` `(` FormalParameters `)` `{` GeneratorBody `}`

GeneratorExpression : `function` `*` BindingIdentifier? `(` FormalParameters `)` `{` GeneratorBody `}`
GeneratorExpression :
`function` `*` BindingIdentifier? `(` FormalParameters `)` `{` GeneratorBody `}`
</emu-grammar>
<ul>
<li>
Expand Down Expand Up @@ -20318,11 +20329,12 @@ <h1>Static Semantics: Early Errors</h1>
<li>It is a Syntax Error if any element of the BoundNames of |UniqueFormalParameters| also occurs in the LexicallyDeclaredNames of |AsyncGeneratorBody|.</li>
</ul>
<emu-grammar>
AsyncGeneratorDeclaration : `async` `function` `*` BindingIdentifier `(` FormalParameters `)` `{` AsyncGeneratorBody `}`

AsyncGeneratorDeclaration : `async` `function` `*` `(` FormalParameters `)` `{` AsyncGeneratorBody `}`
AsyncGeneratorDeclaration :
`async` `function` `*` BindingIdentifier `(` FormalParameters `)` `{` AsyncGeneratorBody `}`
`async` `function` `*` `(` FormalParameters `)` `{` AsyncGeneratorBody `}`

AsyncGeneratorExpression : `async` `function` `*` BindingIdentifier? `(` FormalParameters `)` `{` AsyncGeneratorBody `}`
AsyncGeneratorExpression :
`async` `function` `*` BindingIdentifier? `(` FormalParameters `)` `{` AsyncGeneratorBody `}`
</emu-grammar>
<ul>
<li>If the source code matching |FormalParameters| is strict mode code, the Early Error rules for <emu-grammar>UniqueFormalParameters : FormalParameters</emu-grammar> are applied.</li>
Expand Down Expand Up @@ -20765,13 +20777,13 @@ <h1>Static Semantics: Early Errors</h1>
<li>It is a Syntax Error if any element of the BoundNames of |UniqueFormalParameters| also occurs in the LexicallyDeclaredNames of |AsyncFunctionBody|.</li>
</ul>
<emu-grammar>
AsyncFunctionDeclaration : `async` `function` BindingIdentifier `(` FormalParameters `)` `{` AsyncFunctionBody `}`

AsyncFunctionDeclaration : `async` `function` `(` FormalParameters `)` `{` AsyncFunctionBody `}`

AsyncFunctionExpression : `async` `function` `(` FormalParameters `)` `{` AsyncFunctionBody `}`
AsyncFunctionDeclaration :
`async` `function` BindingIdentifier `(` FormalParameters `)` `{` AsyncFunctionBody `}`
`async` `function` `(` FormalParameters `)` `{` AsyncFunctionBody `}`

AsyncFunctionExpression : `async` `function` BindingIdentifier `(` FormalParameters `)` `{` AsyncFunctionBody `}`
AsyncFunctionExpression :
`async` `function` `(` FormalParameters `)` `{` AsyncFunctionBody `}`
`async` `function` BindingIdentifier `(` FormalParameters `)` `{` AsyncFunctionBody `}`
</emu-grammar>
<ul>
<li>It is a Syntax Error if FunctionBodyContainsUseStrict of |AsyncFunctionBody| is *true* and IsSimpleParameterList of |FormalParameters| is *false*.</li>
Expand Down Expand Up @@ -23192,11 +23204,10 @@ <h1>Static Semantics: ExportedBindings</h1>
1. Return the BoundNames of |Declaration|.
</emu-alg>
<emu-grammar>
ExportDeclaration : `export` `default` HoistableDeclaration

ExportDeclaration : `export` `default` ClassDeclaration

ExportDeclaration : `export` `default` AssignmentExpression `;`
ExportDeclaration :
`export` `default` HoistableDeclaration
`export` `default` ClassDeclaration
`export` `default` AssignmentExpression `;`
</emu-grammar>
<emu-alg>
1. Return the BoundNames of this |ExportDeclaration|.
Expand Down Expand Up @@ -23269,11 +23280,10 @@ <h1>Static Semantics: ExportedNames</h1>
1. Return the BoundNames of |Declaration|.
</emu-alg>
<emu-grammar>
ExportDeclaration : `export` `default` HoistableDeclaration

ExportDeclaration : `export` `default` ClassDeclaration

ExportDeclaration : `export` `default` AssignmentExpression `;`
ExportDeclaration :
`export` `default` HoistableDeclaration
`export` `default` ClassDeclaration
`export` `default` AssignmentExpression `;`
</emu-grammar>
<emu-alg>
1. Return &laquo; *"default"* &raquo;.
Expand Down Expand Up @@ -41487,9 +41497,9 @@ <h1>__proto__ Property Names in Object Initializers</h1>
<li>when parsing text for <emu-xref href="#sec-json.parse">JSON.parse</emu-xref>.</li>
</ul>
<emu-grammar>
ObjectLiteral : `{` PropertyDefinitionList `}`

ObjectLiteral : `{` PropertyDefinitionList `,` `}`
ObjectLiteral :
`{` PropertyDefinitionList `}`
`{` PropertyDefinitionList `,` `}`
</emu-grammar>
<ul>
<li>
Expand Down

0 comments on commit 3073b2a

Please sign in to comment.