* Add optionality to catch bindings (plus tests) * Update ast/spec, README, set param to null if no param with plugin optionalCatchBinding * Fix: wrap param = null in else case * Fix tests for optional catch binding; add tests which include finally clause
101 lines
1.9 KiB
JSON
101 lines
1.9 KiB
JSON
{
|
|
"type": "File",
|
|
"start": 0,
|
|
"end": 21,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 6,
|
|
"column": 1
|
|
}
|
|
},
|
|
"program": {
|
|
"type": "Program",
|
|
"start": 0,
|
|
"end": 21,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 6,
|
|
"column": 1
|
|
}
|
|
},
|
|
"sourceType": "script",
|
|
"body": [
|
|
{
|
|
"type": "TryStatement",
|
|
"start": 0,
|
|
"end": 21,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 6,
|
|
"column": 1
|
|
}
|
|
},
|
|
"block": {
|
|
"type": "BlockStatement",
|
|
"start": 4,
|
|
"end": 8,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 4
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 1
|
|
}
|
|
},
|
|
"body": [],
|
|
"directives": []
|
|
},
|
|
"handler": {
|
|
"type": "CatchClause",
|
|
"start": 9,
|
|
"end": 21,
|
|
"loc": {
|
|
"start": {
|
|
"line": 4,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 6,
|
|
"column": 1
|
|
}
|
|
},
|
|
"param": null,
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"start": 15,
|
|
"end": 21,
|
|
"loc": {
|
|
"start": {
|
|
"line": 4,
|
|
"column": 6
|
|
},
|
|
"end": {
|
|
"line": 6,
|
|
"column": 1
|
|
}
|
|
},
|
|
"body": [],
|
|
"directives": []
|
|
}
|
|
},
|
|
"guardedHandlers": [],
|
|
"finalizer": null
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
} |