mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
* fix: disallow non-leading solo await * add more test cases * refactor: remove unused soloAwait state * fix: disallow binary operator after solo await * fix: respect [In] production parameter * update babel-parser dts
68 lines
2.7 KiB
JSON
68 lines
2.7 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":52,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":52}},
|
|
"errors": [
|
|
"SyntaxError: Cannot mix binary operator with solo-await F#-style pipeline. Please wrap the pipeline in parentheses. (2:14)"
|
|
],
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":52,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":52}},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"start":0,"end":52,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":52}},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start":15,"end":19,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":19,"index":19},"identifierName":"test"},
|
|
"name": "test"
|
|
},
|
|
"generator": false,
|
|
"async": true,
|
|
"params": [],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"start":23,"end":52,"loc":{"start":{"line":1,"column":23,"index":23},"end":{"line":3,"column":1,"index":52}},
|
|
"body": [
|
|
{
|
|
"type": "ReturnStatement",
|
|
"start":27,"end":50,"loc":{"start":{"line":2,"column":2,"index":27},"end":{"line":2,"column":25,"index":50}},
|
|
"argument": {
|
|
"type": "BinaryExpression",
|
|
"start":34,"end":49,"loc":{"start":{"line":2,"column":9,"index":34},"end":{"line":2,"column":24,"index":49}},
|
|
"left": {
|
|
"type": "BinaryExpression",
|
|
"start":34,"end":44,"loc":{"start":{"line":2,"column":9,"index":34},"end":{"line":2,"column":19,"index":44}},
|
|
"left": {
|
|
"type": "Identifier",
|
|
"start":34,"end":35,"loc":{"start":{"line":2,"column":9,"index":34},"end":{"line":2,"column":10,"index":35},"identifierName":"x"},
|
|
"name": "x"
|
|
},
|
|
"operator": "|>",
|
|
"right": {
|
|
"type": "AwaitExpression",
|
|
"start":39,"end":44,"loc":{"start":{"line":2,"column":14,"index":39},"end":{"line":2,"column":19,"index":44}}
|
|
}
|
|
},
|
|
"operator": "**",
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"start":48,"end":49,"loc":{"start":{"line":2,"column":23,"index":48},"end":{"line":2,"column":24,"index":49}},
|
|
"extra": {
|
|
"rawValue": 2,
|
|
"raw": "2"
|
|
},
|
|
"value": 2
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
}
|