mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
119 lines
5.5 KiB
JSON
119 lines
5.5 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":53,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":53}},
|
|
"errors": [
|
|
"SyntaxError: Yield expression is not allowed in formal parameters. (2:15)"
|
|
],
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":53,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":53}},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"start":0,"end":53,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":53}},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start":10,"end":12,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":1,"column":12,"index":12},"identifierName":"fn"},
|
|
"name": "fn"
|
|
},
|
|
"generator": true,
|
|
"async": false,
|
|
"params": [],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"start":15,"end":53,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":3,"column":1,"index":53}},
|
|
"body": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"start":19,"end":51,"loc":{"start":{"line":2,"column":2,"index":19},"end":{"line":2,"column":34,"index":51}},
|
|
"expression": {
|
|
"type": "ArrowFunctionExpression",
|
|
"start":19,"end":50,"loc":{"start":{"line":2,"column":2,"index":19},"end":{"line":2,"column":33,"index":50}},
|
|
"id": null,
|
|
"generator": false,
|
|
"async": false,
|
|
"params": [
|
|
{
|
|
"type": "AssignmentPattern",
|
|
"start":20,"end":43,"loc":{"start":{"line":2,"column":3,"index":20},"end":{"line":2,"column":26,"index":43}},
|
|
"left": {
|
|
"type": "Identifier",
|
|
"start":20,"end":21,"loc":{"start":{"line":2,"column":3,"index":20},"end":{"line":2,"column":4,"index":21},"identifierName":"x"},
|
|
"name": "x"
|
|
},
|
|
"right": {
|
|
"type": "BinaryExpression",
|
|
"start":24,"end":43,"loc":{"start":{"line":2,"column":7,"index":24},"end":{"line":2,"column":26,"index":43}},
|
|
"left": {
|
|
"type": "NumericLiteral",
|
|
"start":24,"end":25,"loc":{"start":{"line":2,"column":7,"index":24},"end":{"line":2,"column":8,"index":25}},
|
|
"extra": {
|
|
"rawValue": 3,
|
|
"raw": "3"
|
|
},
|
|
"value": 3
|
|
},
|
|
"operator": "+",
|
|
"right": {
|
|
"type": "BinaryExpression",
|
|
"start":28,"end":43,"loc":{"start":{"line":2,"column":11,"index":28},"end":{"line":2,"column":26,"index":43}},
|
|
"left": {
|
|
"type": "CallExpression",
|
|
"start":28,"end":38,"loc":{"start":{"line":2,"column":11,"index":28},"end":{"line":2,"column":21,"index":38}},
|
|
"callee": {
|
|
"type": "MemberExpression",
|
|
"start":28,"end":31,"loc":{"start":{"line":2,"column":11,"index":28},"end":{"line":2,"column":14,"index":31}},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"start":28,"end":29,"loc":{"start":{"line":2,"column":11,"index":28},"end":{"line":2,"column":12,"index":29},"identifierName":"a"},
|
|
"name": "a"
|
|
},
|
|
"computed": false,
|
|
"property": {
|
|
"type": "Identifier",
|
|
"start":30,"end":31,"loc":{"start":{"line":2,"column":13,"index":30},"end":{"line":2,"column":14,"index":31},"identifierName":"b"},
|
|
"name": "b"
|
|
}
|
|
},
|
|
"arguments": [
|
|
{
|
|
"type": "YieldExpression",
|
|
"start":32,"end":37,"loc":{"start":{"line":2,"column":15,"index":32},"end":{"line":2,"column":20,"index":37}},
|
|
"delegate": false,
|
|
"argument": null
|
|
}
|
|
]
|
|
},
|
|
"operator": "**",
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"start":42,"end":43,"loc":{"start":{"line":2,"column":25,"index":42},"end":{"line":2,"column":26,"index":43}},
|
|
"extra": {
|
|
"rawValue": 2,
|
|
"raw": "2"
|
|
},
|
|
"value": 2
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"start":48,"end":50,"loc":{"start":{"line":2,"column":31,"index":48},"end":{"line":2,"column":33,"index":50}},
|
|
"body": [],
|
|
"directives": []
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
}
|