Skip to content
This repository was archived by the owner on Sep 8, 2021. It is now read-only.

Invert Await parameter, add ContainsAwait, updates #46

Merged
merged 14 commits into from
Jun 23, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,245 changes: 3,628 additions & 617 deletions docs/index.html

Large diffs are not rendered by default.

8,342 changes: 7,880 additions & 462 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"license": "SEE LICENSE IN https://tc39.github.io/ecma262/#sec-copyright-and-software-license",
"devDependencies": {
"del": "^5.1.0",
"ecmarkup": "^6.1.0",
"ecmarkup": "^7.1.0",
"gulp": "^4.0.2",
"gulp-emu": "^1.3.2",
"gulp-live-server": "0.0.31"
Expand Down
31 changes: 26 additions & 5 deletions spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,32 @@ <h1>Abstract Operations</h1>
<emu-import href="sec-operations-on-objects-patch.html"></emu-import>
</emu-clause>

<emu-clause id="sec-ecmascript-language-expressions">
<h1>ECMAScript Language: Expressions</h1>
<emu-clause id="sec-identifiers">
<h1>Identifiers</h1>
<emu-import href="sec-identifiers-static-semantics-early-errors-patch.html"></emu-import>
<emu-clause id="sec-syntax-directed-operations">
<h1>Syntax-Directed Operations</h1>
<p>In addition to those defined in this section, specialized syntax-directed operations are defined throughout this specification.</p>
<emu-clause id="sec-syntax-directed-operations-scope-analysis">
<h1>Scope Analysis</h1>
<emu-import href="sec-static-semantics-lexicallydeclarednames-patch.html"></emu-import>
<emu-import href="sec-static-semantics-lexicallyscopeddeclarations-patch.html"></emu-import>
<emu-import href="sec-static-semantics-vardeclarednames-patch.html"></emu-import>
<emu-import href="sec-static-semantics-varscopeddeclarations-patch.html"></emu-import>
</emu-clause>

<emu-clause id="sec-syntax-directed-operations-labels">
<h1>Labels</h1>
<emu-import href="sec-static-semantics-containsduplicatelabels-patch.html"></emu-import>
<emu-import href="sec-static-semantics-containsundefinedbreaktarget-patch.html"></emu-import>
<emu-import href="sec-static-semantics-containsundefinedcontinuetarget-patch.html"></emu-import>
</emu-clause>
<emu-clause id="sec-syntax-directed-operations-contains">
<h1>Contains</h1>
<emu-import href="sec-static-semantics-contains-patch.html"></emu-import>
<emu-import href="sec-static-semantics-computedpropertycontains-patch.html"></emu-import>
</emu-clause>
<emu-clause id="sec-syntax-directed-operations-miscellaneous">
<h1>Miscellaneous</h1>
<p>These operations are used in multiple places throughout the specification.</p>
<emu-import href="sec-static-semantics-propname-patch.html"></emu-import>
</emu-clause>
</emu-clause>

Expand Down
363 changes: 233 additions & 130 deletions spec/sec-class-definitions-patch.html

Large diffs are not rendered by default.

24 changes: 0 additions & 24 deletions spec/sec-identifiers-static-semantics-early-errors-patch.html

This file was deleted.

18 changes: 9 additions & 9 deletions spec/sec-operations-on-objects-patch.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<emu-clause id="sec-operations-on-objects">
<h1>Operations on Objects</h1>
<emu-clause id="sec-evaluatestaticblock" aoid="EvaluateStaticBlock">
<h1><ins>EvaluateStaticBlock ( _receiver_ , _blockRecord_ )</ins></h1>
<emu-alg>
1. Assert: Type(_receiver_) is Object.
1. Assert: _blockRecord_ is a ClassStaticBlockDefinition Record.
1. Perform ? Call(_blockRecord_.[[Body]], _receiver_).
</emu-alg>
</emu-clause>
<h1>Operations on Objects</h1>
<emu-clause id="sec-evaluatestaticblock" aoid="EvaluateStaticBlock">
<h1><ins>EvaluateStaticBlock ( _receiver_ , _blockRecord_ )</ins></h1>
<emu-alg>
1. Assert: Type(_receiver_) is Object.
1. Assert: _blockRecord_ is a ClassStaticBlockDefinition Record.
1. Perform ? Call(_blockRecord_.[[Body]], _receiver_).
</emu-alg>
</emu-clause>
</emu-clause>
49 changes: 49 additions & 0 deletions spec/sec-static-semantics-computedpropertycontains-patch.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<emu-clause id="sec-static-semantics-computedpropertycontains" oldids="sec-object-initializer-static-semantics-computedpropertycontains,sec-method-definitions-static-semantics-computedpropertycontains,sec-generator-function-definitions-static-semantics-computedpropertycontains,sec-async-generator-function-definitions-static-semantics-computedpropertycontains,sec-class-definitions-static-semantics-computedpropertycontains,sec-async-function-definitions-static-semantics-ComputedPropertyContains" type="sdo" aoid="ComputedPropertyContains">
<h1>Static Semantics: ComputedPropertyContains</h1>
<p>With parameter _symbol_.</p>
<emu-grammar>PropertyName : LiteralPropertyName</emu-grammar>
<emu-alg>
1. Return *false*.
</emu-alg>
<emu-grammar>PropertyName : ComputedPropertyName</emu-grammar>
<emu-alg>
1. Return the result of |ComputedPropertyName| Contains _symbol_.
</emu-alg>
<emu-grammar>
MethodDefinition :
PropertyName `(` UniqueFormalParameters `)` `{` FunctionBody `}`
`get` PropertyName `(` `)` `{` FunctionBody `}`
`set` PropertyName `(` PropertySetParameterList `)` `{` FunctionBody `}`
</emu-grammar>
<emu-alg>
1. Return the result of ComputedPropertyContains for |PropertyName| with argument _symbol_.
</emu-alg>
<emu-grammar>GeneratorMethod : `*` PropertyName `(` UniqueFormalParameters `)` `{` GeneratorBody `}`</emu-grammar>
<emu-alg>
1. Return the result of ComputedPropertyContains for |PropertyName| with argument _symbol_.
</emu-alg>
<emu-grammar>AsyncGeneratorMethod : `async` `*` PropertyName `(` UniqueFormalParameters `)` `{` AsyncGeneratorBody `}`</emu-grammar>
<emu-alg>
1. Return the result of ComputedPropertyContains for |PropertyName| with argument _symbol_.
</emu-alg>
<emu-grammar>ClassElementList : ClassElementList ClassElement</emu-grammar>
<emu-alg>
1. Let _inList_ be ComputedPropertyContains of |ClassElementList| with argument _symbol_.
1. If _inList_ is *true*, return *true*.
1. Return the result of ComputedPropertyContains for |ClassElement| with argument _symbol_.
</emu-alg>
<emu-grammar><ins>ClassElement : ClassStaticBlock</ins></emu-grammar>
<emu-alg>
1. <ins>Return *false*</ins>.
</emu-alg>
<emu-grammar>ClassElement : `;`</emu-grammar>
<emu-alg>
1. Return *false*.
</emu-alg>
<emu-grammar>
AsyncMethod : `async` PropertyName `(` UniqueFormalParameters `)` `{` AsyncFunctionBody `}`
</emu-grammar>
<emu-alg>
1. Return the result of ComputedPropertyContains for |PropertyName| with argument _symbol_.
</emu-alg>
</emu-clause>
133 changes: 133 additions & 0 deletions spec/sec-static-semantics-contains-patch.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<emu-clause id="sec-static-semantics-contains" oldids="sec-object-initializer-static-semantics-contains,sec-static-semantics-static-semantics-contains,sec-function-definitions-static-semantics-contains,sec-arrow-function-definitions-static-semantics-contains,sec-generator-function-definitions-static-semantics-contains,sec-async-generator-function-definitions-static-semantics-contains,sec-class-definitions-static-semantics-contains,sec-async-function-definitions-static-semantics-Contains,sec-async-arrow-function-definitions-static-semantics-Contains" type="sdo" aoid="Contains">
<h1>Static Semantics: Contains</h1>
<p>With parameter _symbol_.</p>
<p>Every grammar production alternative in this specification which is not listed below implicitly has the following default definition of Contains:</p>
<emu-alg>
1. For each child node _child_ of this Parse Node, do
1. If _child_ is an instance of _symbol_, return *true*.
1. If _child_ is an instance of a nonterminal, then
1. Let _contained_ be the result of _child_ Contains _symbol_.
1. If _contained_ is *true*, return *true*.
1. Return *false*.
</emu-alg>
<emu-grammar>
FunctionDeclaration :
`function` BindingIdentifier `(` FormalParameters `)` `{` FunctionBody `}`
`function` `(` FormalParameters `)` `{` FunctionBody `}`

FunctionExpression :
`function` BindingIdentifier? `(` FormalParameters `)` `{` FunctionBody `}`

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

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

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

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

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

AsyncFunctionExpression :
`async` `function` BindingIdentifier? `(` FormalParameters `)` `{` AsyncFunctionBody `}`
</emu-grammar>
<emu-alg>
1. Return *false*.
</emu-alg>
<emu-note>
<p>Static semantic rules that depend upon substructure generally do not look into function definitions.</p>
</emu-note>
<emu-grammar>ClassTail : ClassHeritage? `{` ClassBody `}`</emu-grammar>
<emu-alg>
1. If _symbol_ is |ClassBody|, return *true*.
1. If _symbol_ is |ClassHeritage|, then
1. If |ClassHeritage| is present, return *true*; otherwise return *false*.
1. Let _inHeritage_ be |ClassHeritage| Contains _symbol_.
1. If _inHeritage_ is *true*, return *true*.
1. Return the result of ComputedPropertyContains for |ClassBody| with argument _symbol_.
</emu-alg>
<emu-note>
<p>Static semantic rules that depend upon substructure generally do not look into class bodies except for |PropertyName|s.</p>
</emu-note>

<emu-grammar><ins>ClassStaticBlock: `static` `{` ClassStaticBlockBody `}`</ins></emu-grammar>
<emu-alg>
1. <ins>If _symbol_ is |ClassStaticBlockBody|, return *true*.</ins>
1. <ins>Return *false*.</ins>
</emu-alg>
<emu-note>
<p><ins>Static semantic rules that depend upon substructure generally do not look into `static` initialization blocks.</ins></p>
</emu-note>

<emu-grammar>ArrowFunction : ArrowParameters `=>` ConciseBody</emu-grammar>
<emu-alg>
1. If _symbol_ is not one of |NewTarget|, |SuperProperty|, |SuperCall|, `super` or `this`, return *false*.
1. If |ArrowParameters| Contains _symbol_ is *true*, return *true*.
1. Return |ConciseBody| Contains _symbol_.
</emu-alg>
<emu-grammar>ArrowParameters : CoverParenthesizedExpressionAndArrowParameterList</emu-grammar>
<emu-alg>
1. Let _formals_ be CoveredFormalsList of |CoverParenthesizedExpressionAndArrowParameterList|.
1. Return _formals_ Contains _symbol_.
</emu-alg>
<emu-grammar>
AsyncArrowFunction : `async` AsyncArrowBindingIdentifier `=>` AsyncConciseBody
</emu-grammar>
<emu-alg>
1. If _symbol_ is not one of |NewTarget|, |SuperProperty|, |SuperCall|, `super`, or `this`, return *false*.
1. Return |AsyncConciseBody| Contains _symbol_.
</emu-alg>
<emu-grammar>
AsyncArrowFunction : CoverCallExpressionAndAsyncArrowHead `=>` AsyncConciseBody
</emu-grammar>
<emu-alg>
1. If _symbol_ is not one of |NewTarget|, |SuperProperty|, |SuperCall|, `super`, or `this`, return *false*.
1. Let _head_ be CoveredAsyncArrowHead of |CoverCallExpressionAndAsyncArrowHead|.
1. If _head_ Contains _symbol_ is *true*, return *true*.
1. Return |AsyncConciseBody| Contains _symbol_.
</emu-alg>
<emu-note>
<p>Contains is used to detect `new.target`, `this`, and `super` usage within an |ArrowFunction| or |AsyncArrowFunction|.</p>
</emu-note>
<emu-grammar>PropertyDefinition : MethodDefinition</emu-grammar>
<emu-alg>
1. If _symbol_ is |MethodDefinition|, return *true*.
1. Return the result of ComputedPropertyContains for |MethodDefinition| with argument _symbol_.
</emu-alg>
<emu-grammar>LiteralPropertyName : IdentifierName</emu-grammar>
<emu-alg>
1. Return *false*.
</emu-alg>
<emu-grammar>MemberExpression : MemberExpression `.` IdentifierName</emu-grammar>
<emu-alg>
1. If |MemberExpression| Contains _symbol_ is *true*, return *true*.
1. Return *false*.
</emu-alg>
<emu-grammar>SuperProperty : `super` `.` IdentifierName</emu-grammar>
<emu-alg>
1. If _symbol_ is the |ReservedWord| `super`, return *true*.
1. Return *false*.
</emu-alg>
<emu-grammar>CallExpression : CallExpression `.` IdentifierName</emu-grammar>
<emu-alg>
1. If |CallExpression| Contains _symbol_ is *true*, return *true*.
1. Return *false*.
</emu-alg>
<emu-grammar>OptionalChain : `?.` IdentifierName</emu-grammar>
<emu-alg>
1. Return *false*.
</emu-alg>
<emu-grammar>OptionalChain : OptionalChain `.` IdentifierName</emu-grammar>
<emu-alg>
1. If |OptionalChain| Contains _symbol_ is *true*, return *true*.
1. Return *false*.
</emu-alg>
</emu-clause>
Loading