swc/crates/swc_ecma_parser/tests/tsc/parserParameterList15.json

152 lines
3.1 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 0,
"end": 42,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 9,
"end": 12,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 13,
"end": 18,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "AssignmentPattern",
"span": {
"start": 13,
"end": 18,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 13,
"end": 14,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 17,
"end": 18,
"ctxt": 0
},
"value": 4.0
},
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 0,
"end": 20,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 30,
"end": 33,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 34,
"end": 35,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 34,
"end": 35,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
}
},
{
"type": "Parameter",
"span": {
"start": 37,
"end": 38,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 37,
"end": 38,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 21,
"end": 42,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 40,
"end": 42,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}