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 AST for the module attribute proposal #11015

Merged
merged 1 commit into from Jan 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions packages/babel-parser/ast/spec.md
Expand Up @@ -107,6 +107,7 @@ These are the core @babel/parser (babylon) AST node types.
- [ImportSpecifier](#importspecifier)
- [ImportDefaultSpecifier](#importdefaultspecifier)
- [ImportNamespaceSpecifier](#importnamespacespecifier)
- [ImportAttribute](#importattribute)
- [Exports](#exports)
- [ExportNamedDeclaration](#exportnameddeclaration)
- [ExportSpecifier](#exportspecifier)
Expand Down Expand Up @@ -1221,6 +1222,7 @@ interface ImportDeclaration <: ModuleDeclaration {
importKind: null | "type" | "typeof" | "value";
specifiers: [ ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier ];
source: Literal;
attributes?: [ ImportAttribute ];
}
```

Expand Down Expand Up @@ -1259,6 +1261,18 @@ interface ImportNamespaceSpecifier <: ModuleSpecifier {

A namespace import specifier, e.g., `* as foo` in `import * as foo from "mod.js"`.

### ImportAttribute

```js
interface ImportAttribute <: Node {
type: "ImportAttribute";
key: Identifier;
value: StringLiteral;
xtuc marked this conversation as resolved.
Show resolved Hide resolved
}
```

An attribute specified on the ImportDeclaration.

## Exports

### ExportNamedDeclaration
Expand Down