mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
* add VoidPattern definition * update types artifacts * parse void binding * print void binding * fix typing errors * update parser typings * fix: remove VoidPattern from ForXStatement.left * fix typing errors * add Babel 8 tests * require syntaxType option * add test for object-rest-spread change * feat(types): disallow void pattern in var/let/const declaration * fix: allow nested void pattern in catch param * improve UnexpectedVoidPattern error message * remove R&T integration parser tests * polish: throw different error when CoverDiscardElement is parsed * Update expression.ts Co-authored-by: liuxingbaoyu <[email protected]> * update discardBinding plugin option types --------- Co-authored-by: liuxingbaoyu <[email protected]>
108 lines
4.5 KiB
JSON
108 lines
4.5 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":64,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":64}},
|
|
"errors": [
|
|
"SyntaxError: Unexpected void binding. (2:11)",
|
|
"SyntaxError: Unexpected void binding. (5:16)"
|
|
],
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":64,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":64}},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "BlockStatement",
|
|
"start":0,"end":27,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":27}},
|
|
"body": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"start":4,"end":25,"loc":{"start":{"line":2,"column":2,"index":4},"end":{"line":2,"column":23,"index":25}},
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"start":8,"end":24,"loc":{"start":{"line":2,"column":6,"index":8},"end":{"line":2,"column":22,"index":24}},
|
|
"id": {
|
|
"type": "ObjectPattern",
|
|
"start":8,"end":19,"loc":{"start":{"line":2,"column":6,"index":8},"end":{"line":2,"column":17,"index":19}},
|
|
"properties": [
|
|
{
|
|
"type": "RestElement",
|
|
"start":10,"end":17,"loc":{"start":{"line":2,"column":8,"index":10},"end":{"line":2,"column":15,"index":17}},
|
|
"argument": {
|
|
"type": "VoidPattern",
|
|
"start":13,"end":17,"loc":{"start":{"line":2,"column":11,"index":13},"end":{"line":2,"column":15,"index":17}}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"init": {
|
|
"type": "ObjectExpression",
|
|
"start":22,"end":24,"loc":{"start":{"line":2,"column":20,"index":22},"end":{"line":2,"column":22,"index":24}},
|
|
"properties": []
|
|
}
|
|
}
|
|
],
|
|
"kind": "var"
|
|
}
|
|
],
|
|
"directives": []
|
|
},
|
|
{
|
|
"type": "BlockStatement",
|
|
"start":28,"end":64,"loc":{"start":{"line":4,"column":0,"index":28},"end":{"line":6,"column":1,"index":64}},
|
|
"body": [
|
|
{
|
|
"type": "ForOfStatement",
|
|
"start":32,"end":62,"loc":{"start":{"line":5,"column":2,"index":32},"end":{"line":5,"column":32,"index":62}},
|
|
"await": false,
|
|
"left": {
|
|
"type": "VariableDeclaration",
|
|
"start":37,"end":52,"loc":{"start":{"line":5,"column":7,"index":37},"end":{"line":5,"column":22,"index":52}},
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"start":41,"end":52,"loc":{"start":{"line":5,"column":11,"index":41},"end":{"line":5,"column":22,"index":52}},
|
|
"id": {
|
|
"type": "ObjectPattern",
|
|
"start":41,"end":52,"loc":{"start":{"line":5,"column":11,"index":41},"end":{"line":5,"column":22,"index":52}},
|
|
"properties": [
|
|
{
|
|
"type": "RestElement",
|
|
"start":43,"end":50,"loc":{"start":{"line":5,"column":13,"index":43},"end":{"line":5,"column":20,"index":50}},
|
|
"argument": {
|
|
"type": "VoidPattern",
|
|
"start":46,"end":50,"loc":{"start":{"line":5,"column":16,"index":46},"end":{"line":5,"column":20,"index":50}}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"init": null
|
|
}
|
|
],
|
|
"kind": "var"
|
|
},
|
|
"right": {
|
|
"type": "ArrayExpression",
|
|
"start":56,"end":60,"loc":{"start":{"line":5,"column":26,"index":56},"end":{"line":5,"column":30,"index":60}},
|
|
"elements": [
|
|
{
|
|
"type": "ObjectExpression",
|
|
"start":57,"end":59,"loc":{"start":{"line":5,"column":27,"index":57},"end":{"line":5,"column":29,"index":59}},
|
|
"properties": []
|
|
}
|
|
]
|
|
},
|
|
"body": {
|
|
"type": "EmptyStatement",
|
|
"start":61,"end":62,"loc":{"start":{"line":5,"column":31,"index":61},"end":{"line":5,"column":32,"index":62}}
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
}
|