Merge pull request #8009 from babel/xtuc-patch-2

update AST spec - interpreter
This commit is contained in:
Sven SAULEAU 2018-05-23 12:57:10 +02:00 committed by GitHub
commit 01d969a182
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,6 +45,7 @@ These are the core @babel/parser (babylon) AST node types.
- [Decorator](#decorator)
- [Directive](#directive)
- [DirectiveLiteral](#directiveliteral)
- [InterpreterDirective](#interpreterdirective)
- [Expressions](#expressions)
- [Super](#super)
- [Import](#import)
@ -239,6 +240,7 @@ interface NumericLiteral <: Literal {
```js
interface Program <: Node {
type: "Program";
interpreter: InterpreterDirective | null;
sourceType: "script" | "module";
body: [ Statement | ModuleDeclaration ];
directives: [ Directive ];
@ -583,6 +585,14 @@ interface DirectiveLiteral <: StringLiteral {
}
```
## InterpreterDirective
```js
interface InterpreterDirective <: StringLiteral {
type: "InterpreterDirective";
}
```
# Expressions
```js