add function.sent
This commit is contained in:
3
packages/babylon/test/fixtures/experimental/function-sent/inside-function/actual.js
vendored
Normal file
3
packages/babylon/test/fixtures/experimental/function-sent/inside-function/actual.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
function foo() {
|
||||
return function.sent;
|
||||
}
|
||||
3
packages/babylon/test/fixtures/experimental/function-sent/inside-function/options.json
vendored
Normal file
3
packages/babylon/test/fixtures/experimental/function-sent/inside-function/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "Unexpected token (2:17)"
|
||||
}
|
||||
3
packages/babylon/test/fixtures/experimental/function-sent/inside-generator/actual.js
vendored
Normal file
3
packages/babylon/test/fixtures/experimental/function-sent/inside-generator/actual.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
function* foo() {
|
||||
return function.sent;
|
||||
}
|
||||
148
packages/babylon/test/fixtures/experimental/function-sent/inside-generator/expected.json
vendored
Normal file
148
packages/babylon/test/fixtures/experimental/function-sent/inside-generator/expected.json
vendored
Normal file
@@ -0,0 +1,148 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 43,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 43,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"body": [
|
||||
{
|
||||
"type": "FunctionDeclaration",
|
||||
"start": 0,
|
||||
"end": 43,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 10,
|
||||
"end": 13,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 10
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"name": "foo"
|
||||
},
|
||||
"generator": true,
|
||||
"expression": false,
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start": 16,
|
||||
"end": 43,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 16
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"body": [
|
||||
{
|
||||
"type": "ReturnStatement",
|
||||
"start": 20,
|
||||
"end": 41,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 2
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"argument": {
|
||||
"type": "MetaProperty",
|
||||
"start": 27,
|
||||
"end": 40,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 9
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 22
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"type": "Identifier",
|
||||
"start": 27,
|
||||
"end": 35,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 9
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"name": "function"
|
||||
},
|
||||
"property": {
|
||||
"type": "Identifier",
|
||||
"start": 36,
|
||||
"end": 40,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 18
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 22
|
||||
}
|
||||
},
|
||||
"name": "sent"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
3
packages/babylon/test/fixtures/experimental/function-sent/options.json
vendored
Normal file
3
packages/babylon/test/fixtures/experimental/function-sent/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"plugins": ["functionSent"]
|
||||
}
|
||||
Reference in New Issue
Block a user