swc/crates/swc_ecma_parser/tests/js/optional-chaining/4/input.js.json
Donny/강동윤 aa83584634
refactor(es/ast): Reimplement optional chaining (#7441)
**Related issue:**

 - Closes #7003.
 - Closes #7156.
2023-06-12 06:47:40 +00:00

84 lines
1.8 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 9,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 1,
"end": 9,
"ctxt": 0
},
"expression": {
"type": "OptionalChainingExpression",
"span": {
"start": 1,
"end": 9,
"ctxt": 0
},
"optional": false,
"base": {
"type": "MemberExpression",
"span": {
"start": 1,
"end": 9,
"ctxt": 0
},
"object": {
"type": "OptionalChainingExpression",
"span": {
"start": 1,
"end": 7,
"ctxt": 0
},
"optional": true,
"base": {
"type": "MemberExpression",
"span": {
"start": 1,
"end": 7,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1,
"end": 4,
"ctxt": 0
},
"value": "obj",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 6,
"end": 7,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
"property": {
"type": "Identifier",
"span": {
"start": 8,
"end": 9,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
}
}
],
"interpreter": null
}