Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Latest commit

 

History

History
43 lines (29 loc) · 1.29 KB

ESTree.md

File metadata and controls

43 lines (29 loc) · 1.29 KB

This document specifies the extensions to the ESTree ES6 AST types to support the "export-ns-from" proposal.

Modules

ExportNamedDeclaration

extend interface ExportNamedDeclaration {
    specifiers: [ ExportSpecifier | ExportNamespaceSpecifier ];
}

Extends the ExportNamedDeclaration, e.g., export {foo} from "mod"; to allow a new type of specifier: ExportNamespaceSpecifier.

Note: When source is null, having specifiers include ExportNamespaceSpecifier results in an invalid state.

Note: Having specifiers include more than one ExportNamespaceSpecifier results in an invalid state.

Note: Having specifiers include both ExportSpecifier and ExportNamespaceSpecifier results in an invalid state.

ExportNamespaceSpecifier

interface ExportNamespaceSpecifier <: Node {
    type: "ExportNamespaceSpecifier";
    exported: Identifier;
}

An exported binding * as ns in export * as ns from "mod";. The exported field refers to the name exported in this module. That name is bound to the ModuleNameSpace exotic object from the source of the parent ExportNamedDeclaration.