Skip to content

Commit

Permalink
Escape nested asterisks.
Browse files Browse the repository at this point in the history
  • Loading branch information
rkirsling committed Oct 14, 2019
1 parent aa5be6d commit a0bcce7
Showing 1 changed file with 39 additions and 39 deletions.
78 changes: 39 additions & 39 deletions spec.html
Expand Up @@ -9659,7 +9659,7 @@ <h1>[[Get]] ( _P_, _Receiver_ )</h1>
1. Assert: _binding_ is a ResolvedBinding Record.
1. Let _targetModule_ be _binding_.[[Module]].
1. Assert: _targetModule_ is not *undefined*.
1. If _binding_.[[BindingName]] is *"*namespace*"*, then
1. If _binding_.[[BindingName]] is *"\*namespace\*"*, then
1. Return ? GetModuleNamespace(_targetModule_).
1. Let _targetEnv_ be _targetModule_.[[Environment]].
1. If _targetEnv_ is *undefined*, throw a *ReferenceError* exception.
Expand Down Expand Up @@ -19114,10 +19114,10 @@ <h1>Static Semantics: BoundNames</h1>
</emu-alg>
<emu-grammar>FunctionDeclaration : `function` `(` FormalParameters `)` `{` FunctionBody `}`</emu-grammar>
<emu-alg>
1. Return &laquo; *"*default*"* &raquo;.
1. Return &laquo; *"\*default\*"* &raquo;.
</emu-alg>
<emu-note>
<p>*"*default*"* is used within this specification as a synthetic name for hoistable anonymous functions that are defined using export declarations.</p>
<p>*"\*default\*"* is used within this specification as a synthetic name for hoistable anonymous functions that are defined using export declarations.</p>
</emu-note>
<emu-grammar>FormalParameters : [empty]</emu-grammar>
<emu-alg>
Expand Down Expand Up @@ -20018,10 +20018,10 @@ <h1>Static Semantics: BoundNames</h1>
</emu-alg>
<emu-grammar>GeneratorDeclaration : `function` `*` `(` FormalParameters `)` `{` GeneratorBody `}`</emu-grammar>
<emu-alg>
1. Return &laquo; *"*default*"* &raquo;.
1. Return &laquo; *"\*default\*"* &raquo;.
</emu-alg>
<emu-note>
<p>*"*default*"* is used within this specification as a synthetic name for hoistable anonymous functions that are defined using export declarations.</p>
<p>*"\*default\*"* is used within this specification as a synthetic name for hoistable anonymous functions that are defined using export declarations.</p>
</emu-note>
</emu-clause>

Expand Down Expand Up @@ -20343,10 +20343,10 @@ <h1>Static Semantics: BoundNames</h1>
</emu-alg>
<emu-grammar>AsyncGeneratorDeclaration : `async` `function` `*` `(` FormalParameters `)` `{` AsyncGeneratorBody `}`</emu-grammar>
<emu-alg>
1. Return &laquo; *"*default*"* &raquo;.
1. Return &laquo; *"\*default\*"* &raquo;.
</emu-alg>
<emu-note>
<p>*"*default*"* is used within this specification as a synthetic name for hoistable anonymous functions that are defined using export declarations.</p>
<p>*"\*default\*"* is used within this specification as a synthetic name for hoistable anonymous functions that are defined using export declarations.</p>
</emu-note>
</emu-clause>

Expand Down Expand Up @@ -20632,7 +20632,7 @@ <h1>Static Semantics: BoundNames</h1>
</emu-alg>
<emu-grammar>ClassDeclaration : `class` ClassTail</emu-grammar>
<emu-alg>
1. Return &laquo; *"*default*"* &raquo;.
1. Return &laquo; *"\*default\*"* &raquo;.
</emu-alg>
</emu-clause>

Expand Down Expand Up @@ -21000,9 +21000,9 @@ <h1>Static Semantics: BoundNames</h1>
AsyncFunctionDeclaration : `async` `function` `(` FormalParameters `)` `{` AsyncFunctionBody `}`
</emu-grammar>
<emu-alg>
1. Return &laquo; *"*default*"* &raquo;.
1. Return &laquo; *"\*default\*"* &raquo;.
</emu-alg>
<emu-note>"`*default*`" is used within this specification as a synthetic name for hoistable anonymous functions that are defined using export declarations.</emu-note>
<emu-note>*"\*default\*"* is used within this specification as a synthetic name for hoistable anonymous functions that are defined using export declarations.</emu-note>
</emu-clause>

<emu-clause id="sec-async-function-definitions-static-semantics-ComputedPropertyContains">
Expand Down Expand Up @@ -22538,7 +22538,7 @@ <h1>Abstract Module Records</h1>
ResolveExport(_exportName_ [, _resolveSet_])
</td>
<td>
<p>Return the binding of a name exported by this module. Bindings are represented by a <dfn id="resolvedbinding-record">ResolvedBinding Record</dfn>, of the form { [[Module]]: Module Record, [[BindingName]]: String }. If the export is a Module Namespace Object without a direct binding in any module, [[BindingName]] will be set to *"*namespace*"*. Return *null* if the name cannot be resolved, or *"ambiguous"* if multiple bindings were found.</p>
<p>Return the binding of a name exported by this module. Bindings are represented by a <dfn id="resolvedbinding-record">ResolvedBinding Record</dfn>, of the form { [[Module]]: Module Record, [[BindingName]]: String }. If the export is a Module Namespace Object without a direct binding in any module, [[BindingName]] will be set to *"\*namespace\*"*. Return *null* if the name cannot be resolved, or *"ambiguous"* if multiple bindings were found.</p>
<p>This operation must be idempotent if it completes normally. Each time it is called with a specific _exportName_, _resolveSet_ pair as arguments it must return the same result.</p>
</td>
</tr>
Expand Down Expand Up @@ -22984,7 +22984,7 @@ <h1>Source Text Module Records</h1>
String
</td>
<td>
The name under which the desired binding is exported by the module identified by [[ModuleRequest]]. The value *"*"* indicates that the import request is for the target module's namespace object.
The name under which the desired binding is exported by the module identified by [[ModuleRequest]]. The value *"\*"* indicates that the import request is for the target module's namespace object.
</td>
</tr>
<tr>
Expand Down Expand Up @@ -23042,7 +23042,7 @@ <h1>Source Text Module Records</h1>
*"mod"*
</td>
<td>
*"*"*
*"\*"*
</td>
<td>
*"ns"*
Expand Down Expand Up @@ -23133,7 +23133,7 @@ <h1>Source Text Module Records</h1>
String | null
</td>
<td>
The name under which the desired binding is exported by the module identified by [[ModuleRequest]]. *null* if the |ExportDeclaration| does not have a |ModuleSpecifier|. *"*"* indicates that the export request is for all exported bindings.
The name under which the desired binding is exported by the module identified by [[ModuleRequest]]. *null* if the |ExportDeclaration| does not have a |ModuleSpecifier|. *"\*"* indicates that the export request is for all exported bindings.
</td>
</tr>
<tr>
Expand Down Expand Up @@ -23220,7 +23220,7 @@ <h1>Source Text Module Records</h1>
*null*
</td>
<td>
*"*default*"*
*"\*default\*"*
</td>
</tr>
<tr>
Expand All @@ -23237,7 +23237,7 @@ <h1>Source Text Module Records</h1>
*null*
</td>
<td>
*"*default*"*
*"\*default\*"*
</td>
</tr>
<tr>
Expand Down Expand Up @@ -23319,7 +23319,7 @@ <h1>Source Text Module Records</h1>
*"mod"*
</td>
<td>
*"*"*
*"\*"*
</td>
<td>
*null*
Expand All @@ -23336,7 +23336,7 @@ <h1>Source Text Module Records</h1>
*"mod"*
</td>
<td>
*"*"*
*"\*"*
</td>
<td>
*null*
Expand Down Expand Up @@ -23368,13 +23368,13 @@ <h1>ParseModule ( _sourceText_, _realm_, _hostDefined_ )</h1>
1. Append _ee_ to _localExportEntries_.
1. Else,
1. Let _ie_ be the element of _importEntries_ whose [[LocalName]] is the same as _ee_.[[LocalName]].
1. If _ie_.[[ImportName]] is *"*"*, then
1. If _ie_.[[ImportName]] is *"\*"*, then
1. NOTE: This is a re-export of an imported module namespace object.
1. Append _ee_ to _localExportEntries_.
1. Else,
1. NOTE: This is a re-export of a single name.
1. Append the ExportEntry Record { [[ModuleRequest]]: _ie_.[[ModuleRequest]], [[ImportName]]: _ie_.[[ImportName]], [[LocalName]]: *null*, [[ExportName]]: _ee_.[[ExportName]] } to _indirectExportEntries_.
1. Else if _ee_.[[ImportName]] is *"*"* and _ee_.[[ExportName]] is *null*, then
1. Else if _ee_.[[ImportName]] is *"\*"* and _ee_.[[ExportName]] is *null*, then
1. Append _ee_ to _starExportEntries_.
1. Else,
1. Append _ee_ to _indirectExportEntries_.
Expand Down Expand Up @@ -23424,7 +23424,7 @@ <h1>ResolveExport ( _exportName_ [ , _resolveSet_ ] ) Concrete Method</h1>

<p>ResolveExport attempts to resolve an imported binding to the actual defining module and local binding name. The defining module may be the module represented by the Module Record this method was invoked on or some other module that is imported by that module. The parameter _resolveSet_ is used to detect unresolved circular import/export paths. If a pair consisting of specific Module Record and _exportName_ is reached that is already in _resolveSet_, an import circularity has been encountered. Before recursively calling ResolveExport, a pair consisting of _module_ and _exportName_ is added to _resolveSet_.</p>

<p>If a defining module is found, a ResolvedBinding Record { [[Module]], [[BindingName]] } is returned. This record identifies the resolved binding of the originally requested export, unless this is the export of a namespace with no local binding. In this case, [[BindingName]] will be set to *"*namespace*"*. If no definition was found or the request is found to be circular, *null* is returned. If the request is found to be ambiguous, the string *"ambiguous"* is returned.</p>
<p>If a defining module is found, a ResolvedBinding Record { [[Module]], [[BindingName]] } is returned. This record identifies the resolved binding of the originally requested export, unless this is the export of a namespace with no local binding. In this case, [[BindingName]] will be set to *"\*namespace\*"*. If no definition was found or the request is found to be circular, *null* is returned. If the request is found to be ambiguous, the string *"ambiguous"* is returned.</p>

<p>This abstract method performs the following steps:</p>

Expand All @@ -23444,9 +23444,9 @@ <h1>ResolveExport ( _exportName_ [ , _resolveSet_ ] ) Concrete Method</h1>
1. For each ExportEntry Record _e_ in _module_.[[IndirectExportEntries]], do
1. If SameValue(_exportName_, _e_.[[ExportName]]) is *true*, then
1. Let _importedModule_ be ? HostResolveImportedModule(_module_, _e_.[[ModuleRequest]]).
1. If _e_.[[ImportName]] is *"*"*, then
1. If _e_.[[ImportName]] is *"\*"*, then
1. Assert: _module_ does not provide the direct binding for this export.
1. Return ResolvedBinding Record { [[Module]]: _importedModule_, [[BindingName]]: *"*namespace*"* }.
1. Return ResolvedBinding Record { [[Module]]: _importedModule_, [[BindingName]]: *"\*namespace\*"* }.
1. Else,
1. Assert: _module_ imports a specific binding for this export.
1. Return _importedModule_.ResolveExport(_e_.[[ImportName]], _resolveSet_).
Expand Down Expand Up @@ -23491,14 +23491,14 @@ <h1>InitializeEnvironment ( ) Concrete Method</h1>
1. For each ImportEntry Record _in_ in _module_.[[ImportEntries]], do
1. Let _importedModule_ be ! HostResolveImportedModule(_module_, _in_.[[ModuleRequest]]).
1. NOTE: The above call cannot fail because imported module requests are a subset of _module_.[[RequestedModules]], and these have been resolved earlier in this algorithm.
1. If _in_.[[ImportName]] is *"*"*, then
1. If _in_.[[ImportName]] is *"\*"*, then
1. Let _namespace_ be ? GetModuleNamespace(_importedModule_).
1. Perform ! _envRec_.CreateImmutableBinding(_in_.[[LocalName]], *true*).
1. Call _envRec_.InitializeBinding(_in_.[[LocalName]], _namespace_).
1. Else,
1. Let _resolution_ be ? _importedModule_.ResolveExport(_in_.[[ImportName]]).
1. If _resolution_ is *null* or *"ambiguous"*, throw a *SyntaxError* exception.
1. If _resolution_.[[BindingName]] is *"*namespace*"*, then
1. If _resolution_.[[BindingName]] is *"\*namespace\*"*, then
1. Let _namespace_ be ? GetModuleNamespace(_resolution_.[[Module]]).
1. Perform ! _envRec_.CreateImmutableBinding(_in_.[[LocalName]], *true*).
1. Call _envRec_.InitializeBinding(_in_.[[LocalName]], _namespace_).
Expand Down Expand Up @@ -23852,7 +23852,7 @@ <h1>Static Semantics: ImportEntriesForModule</h1>
<emu-grammar>NameSpaceImport : `*` `as` ImportedBinding</emu-grammar>
<emu-alg>
1. Let _localName_ be the StringValue of |ImportedBinding|.
1. Let _entry_ be the ImportEntry Record { [[ModuleRequest]]: _module_, [[ImportName]]: *"*"*, [[LocalName]]: _localName_ }.
1. Let _entry_ be the ImportEntry Record { [[ModuleRequest]]: _module_, [[ImportName]]: *"\*"*, [[LocalName]]: _localName_ }.
1. Return a new List containing _entry_.
</emu-alg>
<emu-grammar>NamedImports : `{` `}`</emu-grammar>
Expand Down Expand Up @@ -23961,18 +23961,18 @@ <h1>Static Semantics: BoundNames</h1>
<emu-grammar>ExportDeclaration : `export` `default` HoistableDeclaration</emu-grammar>
<emu-alg>
1. Let _declarationNames_ be the BoundNames of |HoistableDeclaration|.
1. If _declarationNames_ does not include the element *"*default*"*, append *"*default*"* to _declarationNames_.
1. If _declarationNames_ does not include the element *"\*default\*"*, append *"\*default\*"* to _declarationNames_.
1. Return _declarationNames_.
</emu-alg>
<emu-grammar>ExportDeclaration : `export` `default` ClassDeclaration</emu-grammar>
<emu-alg>
1. Let _declarationNames_ be the BoundNames of |ClassDeclaration|.
1. If _declarationNames_ does not include the element *"*default*"*, append *"*default*"* to _declarationNames_.
1. If _declarationNames_ does not include the element *"\*default\*"*, append *"\*default\*"* to _declarationNames_.
1. Return _declarationNames_.
</emu-alg>
<emu-grammar>ExportDeclaration : `export` `default` AssignmentExpression `;`</emu-grammar>
<emu-alg>
1. Return &laquo; *"*default*"* &raquo;.
1. Return &laquo; *"\*default\*"* &raquo;.
</emu-alg>
</emu-clause>

Expand Down Expand Up @@ -24127,11 +24127,11 @@ <h1>Static Semantics: ExportEntries</h1>
</emu-alg>
<emu-grammar>ExportDeclaration : `export` `default` AssignmentExpression `;`</emu-grammar>
<emu-alg>
1. Let _entry_ be the ExportEntry Record { [[ModuleRequest]]: *null*, [[ImportName]]: *null*, [[LocalName]]: *"*default*"*, [[ExportName]]: *"default"* }.
1. Let _entry_ be the ExportEntry Record { [[ModuleRequest]]: *null*, [[ImportName]]: *null*, [[LocalName]]: *"\*default\*"*, [[ExportName]]: *"default"* }.
1. Return a new List containing _entry_.
</emu-alg>
<emu-note>
<p>*"*default*"* is used within this specification as a synthetic name for anonymous default export values.</p>
<p>*"\*default\*"* is used within this specification as a synthetic name for anonymous default export values.</p>
</emu-note>
</emu-clause>

Expand All @@ -24140,13 +24140,13 @@ <h1>Static Semantics: ExportEntriesForModule</h1>
<p>With parameter _module_.</p>
<emu-grammar>ExportFromClause : `*`</emu-grammar>
<emu-alg>
1. Let _entry_ be the ExportEntry Record { [[ModuleRequest]]: _module_, [[ImportName]]: *"*"*, [[LocalName]]: *null*, [[ExportName]]: *null* }.
1. Let _entry_ be the ExportEntry Record { [[ModuleRequest]]: _module_, [[ImportName]]: *"\*"*, [[LocalName]]: *null*, [[ExportName]]: *null* }.
1. Return a new List containing _entry_.
</emu-alg>
<emu-grammar>ExportFromClause : `*` `as` IdentifierName</emu-grammar>
<emu-alg>
1. Let _exportName_ be the StringValue of |IdentifierName|.
1. Let _entry_ be the ExportEntry Record { [[ModuleRequest]]: _module_, [[ImportName]]: *"*"*, [[LocalName]]: *null*, [[ExportName]]: _exportName_ }.
1. Let _entry_ be the ExportEntry Record { [[ModuleRequest]]: _module_, [[ImportName]]: *"\*"*, [[LocalName]]: *null*, [[ExportName]]: _exportName_ }.
1. Return a new List containing _entry_.
</emu-alg>
<emu-grammar>NamedExports : `{` `}`</emu-grammar>
Expand Down Expand Up @@ -24302,9 +24302,9 @@ <h1>Runtime Semantics: Evaluation</h1>
<emu-alg>
1. Let _value_ be ? BindingClassDeclarationEvaluation of |ClassDeclaration|.
1. Let _className_ be the sole element of BoundNames of |ClassDeclaration|.
1. If _className_ is *"*default*"*, then
1. If _className_ is *"\*default\*"*, then
1. Let _env_ be the running execution context's LexicalEnvironment.
1. Perform ? InitializeBoundName(*"*default*"*, _value_, _env_).
1. Perform ? InitializeBoundName(*"\*default\*"*, _value_, _env_).
1. Return NormalCompletion(~empty~).
</emu-alg>
<emu-grammar>ExportDeclaration : `export` `default` AssignmentExpression `;`</emu-grammar>
Expand All @@ -24315,7 +24315,7 @@ <h1>Runtime Semantics: Evaluation</h1>
1. Let _rhs_ be the result of evaluating |AssignmentExpression|.
1. Let _value_ be ? GetValue(_rhs_).
1. Let _env_ be the running execution context's LexicalEnvironment.
1. Perform ? InitializeBoundName(*"*default*"*, _value_, _env_).
1. Perform ? InitializeBoundName(*"\*default\*"*, _value_, _env_).
1. Return NormalCompletion(~empty~).
</emu-alg>
</emu-clause>
Expand Down Expand Up @@ -25823,9 +25823,9 @@ <h1>Runtime Semantics: CreateDynamicFunction ( _constructor_, _newTarget_, _kind
<tbody>
<tr><th>Kind</th><th>Prefix</th></tr>
<tr><td>~normal~</td><td>*"function"*</td></tr>
<tr><td>~generator~</td><td>*"function*"*</td></tr>
<tr><td>~generator~</td><td>*"function\*"*</td></tr>
<tr><td>~async~</td><td>*"async function"*</td></tr>
<tr><td>~asyncGenerator~</td><td>*"async function*"*</td></tr>
<tr><td>~asyncGenerator~</td><td>*"async function\*"*</td></tr>
</tbody>
</table>
</emu-table>
Expand Down Expand Up @@ -41943,7 +41943,7 @@ <h1>escape ( _string_ )</h1>
1. Let _k_ be 0.
1. Repeat, while _k_ &lt; _length_,
1. Let _char_ be the code unit (represented as a 16-bit unsigned integer) at index _k_ within _string_.
1. If _char_ is one of the code units in *"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@*_+-./"*, then
1. If _char_ is one of the code units in *"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@\*_+-./"*, then
1. Let _S_ be the String value containing the single code unit _char_.
1. Else if _char_ &ge; 256, then
1. Let _n_ be the numeric value of _char_.
Expand Down

0 comments on commit a0bcce7

Please sign in to comment.