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]>
42 lines
1.6 KiB
JSON
42 lines
1.6 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":22,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":22,"index":22}},
|
|
"errors": [
|
|
"SyntaxError: A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error. (1:14)"
|
|
],
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":22,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":22,"index":22}},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "TryStatement",
|
|
"start":0,"end":22,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":22,"index":22}},
|
|
"block": {
|
|
"type": "BlockStatement",
|
|
"start":4,"end":6,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":1,"column":6,"index":6}},
|
|
"body": [],
|
|
"directives": []
|
|
},
|
|
"handler": {
|
|
"type": "CatchClause",
|
|
"start":7,"end":22,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":1,"column":22,"index":22}},
|
|
"param": {
|
|
"type": "VoidPattern",
|
|
"start":14,"end":18,"loc":{"start":{"line":1,"column":14,"index":14},"end":{"line":1,"column":18,"index":18}}
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"start":20,"end":22,"loc":{"start":{"line":1,"column":20,"index":20},"end":{"line":1,"column":22,"index":22}},
|
|
"body": [],
|
|
"directives": []
|
|
}
|
|
},
|
|
"finalizer": null
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
}
|