Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add export * as ns from "mod” updates. #1005

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
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
88 changes: 57 additions & 31 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -21962,6 +21962,23 @@ <h1>Source Text Module Records</h1>
*null*
</td>
</tr>
<tr>
<td>
`export * as ns from "mod";`
</td>
<td>
*null*
</td>
<td>
`"mod"`
</td>
<td>
`"*"`
</td>
<td>
`"ns"`
</td>
</tr>
</tbody>
</table>
</emu-table>
Expand Down Expand Up @@ -22043,7 +22060,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 use 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.</p>

<p>If a defining module cannot be found (i.e. resolution fails), there are three cases.</p>
<ul>
<li>The resolution failure can be blamed on a particular module. Then this culprit module record is returned.</li>
Expand Down Expand Up @@ -22649,15 +22666,22 @@ <h1>Exports</h1>
<h2>Syntax</h2>
<emu-grammar type="definition">
ExportDeclaration :
`export` `*` FromClause `;`
`export` ExportClause FromClause `;`
`export` ExportFromClause FromClause `;`
`export` ExportClause `;`
`export` VariableStatement[~Yield, ~Await]
`export` Declaration[~Yield, ~Await]
`export` `default` HoistableDeclaration[~Yield, ~Await, +Default]
`export` `default` ClassDeclaration[~Yield, ~Await, +Default]
`export` `default` [lookahead &lt;! {`function`, `async` [no |LineTerminator| here] `function`, `class`}] AssignmentExpression[+In, ~Yield, ~Await] `;`

ExportFromClause :
`*`
ExportClause
NameSpaceExport

NameSpaceExport:
`*` `as` IdentifierName

ExportClause :
`{` `}`
`{` ExportsList `}`
Expand Down Expand Up @@ -22692,8 +22716,7 @@ <h1>Static Semantics: BoundNames</h1>
<emu-see-also-para op="BoundNames"></emu-see-also-para>
<emu-grammar>
ExportDeclaration :
`export` `*` FromClause `;`
`export` ExportClause FromClause `;`
`export` ExportFromClause FromClause `;`
`export` ExportClause `;`
</emu-grammar>
<emu-alg>
Expand Down Expand Up @@ -22731,8 +22754,7 @@ <h1>Static Semantics: ExportedBindings</h1>
<emu-see-also-para op="ExportedBindings"></emu-see-also-para>
<emu-grammar>
ExportDeclaration :
`export` ExportClause FromClause `;`
`export` `*` FromClause `;`
`export` ExportFromClause FromClause `;`
</emu-grammar>
<emu-alg>
1. Return a new empty List.
Expand Down Expand Up @@ -22783,17 +22805,21 @@ <h1>Static Semantics: ExportedBindings</h1>
<emu-clause id="sec-exports-static-semantics-exportednames">
<h1>Static Semantics: ExportedNames</h1>
<emu-see-also-para op="ExportedNames"></emu-see-also-para>
<emu-grammar>ExportDeclaration : `export` `*` FromClause `;`</emu-grammar>
<emu-grammar>ExportDeclaration : `export` ExportFromClause FromClause `;`</emu-grammar>
<emu-alg>
1. Return the ExportedNames of ExportFromClause.
</emu-alg>
<emu-grammar>ExportFromClause : `*`</emu-grammar>
<emu-alg>
1. Return a new empty List.
</emu-alg>
<emu-grammar>
ExportDeclaration : `export` ExportClause FromClause `;`

ExportDeclaration : `export` ExportClause `;`
</emu-grammar>
<emu-grammar>ExportFromClause : ExportClause</emu-grammar>
<emu-alg>
1. Return the ExportedNames of |ExportClause|.
1. Return the ExportedNames of ExportClause.
</emu-alg>
<emu-grammar>ExportFromClause : NameSpaceExport</emu-grammar>
<emu-alg>
1. Return the ExportedNames of NameSpaceExport.
</emu-alg>
<emu-grammar>ExportDeclaration : `export` VariableStatement</emu-grammar>
<emu-alg>
Expand Down Expand Up @@ -22837,16 +22863,10 @@ <h1>Static Semantics: ExportedNames</h1>
<emu-clause id="sec-exports-static-semantics-exportentries">
<h1>Static Semantics: ExportEntries</h1>
<emu-see-also-para op="ExportEntries"></emu-see-also-para>
<emu-grammar>ExportDeclaration : `export` `*` FromClause `;`</emu-grammar>
<emu-alg>
1. Let _module_ be the sole element of ModuleRequests of |FromClause|.
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>ExportDeclaration : `export` ExportClause FromClause `;`</emu-grammar>
<emu-grammar>ExportDeclaration : `export` ExportFromClause FromClause `;`</emu-grammar>
<emu-alg>
1. Let _module_ be the sole element of ModuleRequests of |FromClause|.
1. Return ExportEntriesForModule of |ExportClause| with argument _module_.
1. Return ExportEntriesForModule of |ExportFromClause| with argument _module_.
</emu-alg>
<emu-grammar>ExportDeclaration : `export` ExportClause `;`</emu-grammar>
<emu-alg>
Expand Down Expand Up @@ -22894,6 +22914,17 @@ <h1>Static Semantics: ExportEntries</h1>
<emu-clause id="sec-static-semantics-exportentriesformodule">
<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. 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. Return a new List containing _entry_.
</emu-alg>
<emu-grammar>ExportClause : `{` `}`</emu-grammar>
<emu-alg>
1. Return a new empty List.
Expand Down Expand Up @@ -22935,8 +22966,7 @@ <h1>Static Semantics: IsConstantDeclaration</h1>
<emu-see-also-para op="IsConstantDeclaration"></emu-see-also-para>
<emu-grammar>
ExportDeclaration :
`export` `*` FromClause `;`
`export` ExportClause FromClause `;`
`export` ExportFromClause FromClause `;`
`export` ExportClause `;`
`export` `default` AssignmentExpression `;`
</emu-grammar>
Expand All @@ -22954,8 +22984,7 @@ <h1>Static Semantics: LexicallyScopedDeclarations</h1>
<emu-see-also-para op="LexicallyScopedDeclarations"></emu-see-also-para>
<emu-grammar>
ExportDeclaration :
`export` `*` FromClause `;`
`export` ExportClause FromClause `;`
`export` ExportFromClause FromClause `;`
`export` ExportClause `;`
`export` VariableStatement
</emu-grammar>
Expand Down Expand Up @@ -22985,9 +23014,7 @@ <h1>Static Semantics: LexicallyScopedDeclarations</h1>
<h1>Static Semantics: ModuleRequests</h1>
<emu-see-also-para op="ModuleRequests"></emu-see-also-para>
<emu-grammar>
ExportDeclaration : `export` `*` FromClause `;`

ExportDeclaration : `export` ExportClause FromClause `;`
ExportDeclaration : `export` ExportFromClause FromClause `;`
</emu-grammar>
<emu-alg>
1. Return the ModuleRequests of |FromClause|.
Expand Down Expand Up @@ -23034,8 +23061,7 @@ <h1>Static Semantics: ReferencedBindings</h1>
<h1>Runtime Semantics: Evaluation</h1>
<emu-grammar>
ExportDeclaration :
`export` `*` FromClause `;`
`export` ExportClause FromClause `;`
`export` ExportFromClause FromClause `;`
`export` ExportClause `;`
</emu-grammar>
<emu-alg>
Expand Down