Add support for an InterpreterDirective AST node.
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "BlockStatement",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "IfStatement",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
}
|
||||
},
|
||||
"sourceType": "module",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "ExportDefaultDeclaration",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
|
||||
@@ -27,6 +27,22 @@
|
||||
}
|
||||
},
|
||||
"sourceType": "module",
|
||||
"interpreter": {
|
||||
"type": "InterpreterDirective",
|
||||
"start": 0,
|
||||
"end": 25,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 25
|
||||
}
|
||||
},
|
||||
"value": "/usr/bin/env babel-node"
|
||||
},
|
||||
"body": [
|
||||
{
|
||||
"type": "ImportDeclaration",
|
||||
@@ -112,45 +128,9 @@
|
||||
"raw": "'foobar'"
|
||||
},
|
||||
"value": "foobar"
|
||||
},
|
||||
"leadingComments": [
|
||||
{
|
||||
"type": "CommentLine",
|
||||
"value": "/usr/bin/env babel-node",
|
||||
"start": 0,
|
||||
"end": 25,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 25
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
},
|
||||
"comments": [
|
||||
{
|
||||
"type": "CommentLine",
|
||||
"value": "/usr/bin/env babel-node",
|
||||
"start": 0,
|
||||
"end": 25,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 25
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,22 @@
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"interpreter": {
|
||||
"type": "InterpreterDirective",
|
||||
"start": 0,
|
||||
"end": 25,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 25
|
||||
}
|
||||
},
|
||||
"value": "/usr/bin/env babel-node"
|
||||
},
|
||||
"body": [
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
@@ -148,45 +164,9 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"kind": "var",
|
||||
"leadingComments": [
|
||||
{
|
||||
"type": "CommentLine",
|
||||
"value": "/usr/bin/env babel-node",
|
||||
"start": 0,
|
||||
"end": 25,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 25
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
"kind": "var"
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
},
|
||||
"comments": [
|
||||
{
|
||||
"type": "CommentLine",
|
||||
"value": "/usr/bin/env babel-node",
|
||||
"start": 0,
|
||||
"end": 25,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 25
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,7 @@
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "FunctionDeclaration",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "FunctionDeclaration",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "FunctionDeclaration",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "FunctionDeclaration",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "FunctionDeclaration",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "FunctionDeclaration",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "SwitchStatement",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "SwitchStatement",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "SwitchStatement",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "FunctionDeclaration",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "SwitchStatement",
|
||||
|
||||
Reference in New Issue
Block a user