Merge pull request #8009 from babel/xtuc-patch-2
update AST spec - interpreter
This commit is contained in:
commit
01d969a182
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user