swc/ecmascript/parser/tests/jsx/basic/20/input.js.json

271 lines
6.5 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 0,
"end": 52,
"ctxt": 0
},
"body": [
{
"type": "JSXElement",
"span": {
"start": 0,
"end": 52,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "A",
"optional": false
},
"span": {
"start": 1,
"end": 31,
"ctxt": 0
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 3,
"end": 16,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 3,
"end": 5,
"ctxt": 0
},
"value": "aa",
"optional": false
},
"value": {
"type": "MemberExpression",
"span": {
"start": 12,
"end": 15,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 9,
"end": 12,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 7,
"end": 9,
"ctxt": 0
},
"value": "aa",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 10,
"end": 12,
"ctxt": 0
},
"value": "bb",
"optional": false
},
"computed": false
},
"property": {
"type": "Identifier",
"span": {
"start": 13,
"end": 15,
"ctxt": 0
},
"value": "cc",
"optional": false
},
"computed": false
}
},
{
"type": "JSXAttribute",
"span": {
"start": 17,
"end": 30,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 17,
"end": 19,
"ctxt": 0
},
"value": "bb",
"optional": false
},
"value": {
"type": "MemberExpression",
"span": {
"start": 26,
"end": 29,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 23,
"end": 26,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 21,
"end": 23,
"ctxt": 0
},
"value": "bb",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 24,
"end": 26,
"ctxt": 0
},
"value": "cc",
"optional": false
},
"computed": false
},
"property": {
"type": "Identifier",
"span": {
"start": 27,
"end": 29,
"ctxt": 0
},
"value": "dd",
"optional": false
},
"computed": false
}
}
],
"selfClosing": false
},
"children": [
{
"type": "JSXElement",
"span": {
"start": 31,
"end": 48,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 32,
"end": 35,
"ctxt": 0
},
"value": "div",
"optional": false
},
"span": {
"start": 32,
"end": 36,
"ctxt": 0
},
"selfClosing": false
},
"children": [
{
"type": "JSXExpressionContainer",
"expression": {
"type": "MemberExpression",
"span": {
"start": 39,
"end": 41,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 37,
"end": 39,
"ctxt": 0
},
"value": "aa",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 40,
"end": 41,
"ctxt": 0
},
"value": "b",
"optional": false
},
"computed": false
}
}
],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 44,
"end": 48,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 44,
"end": 47,
"ctxt": 0
},
"value": "div",
"optional": false
}
}
}
],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 50,
"end": 52,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 50,
"end": 51,
"ctxt": 0
},
"value": "A",
"optional": false
}
}
}
]
}