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

336 lines
8.1 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 39,
"end": 152,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 39,
"end": 84,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 54,
"end": 57,
"ctxt": 0
},
"value": "JSX",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 58,
"end": 84,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 61,
"end": 82,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 71,
"end": 78,
"ctxt": 0
},
"value": "Element",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 79,
"end": 82,
"ctxt": 0
},
"body": []
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 86,
"end": 124,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 101,
"end": 102,
"ctxt": 0
},
"value": "A",
"optional": false
},
"body": {
"type": "TsNamespaceDeclaration",
"span": {
"start": 103,
"end": 124,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 103,
"end": 104,
"ctxt": 0
},
"value": "B",
"optional": false
},
"body": {
"type": "TsNamespaceDeclaration",
"span": {
"start": 105,
"end": 124,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 105,
"end": 106,
"ctxt": 0
},
"value": "C",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 107,
"end": 124,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 111,
"end": 122,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 115,
"end": 121,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 115,
"end": 116,
"ctxt": 0
},
"value": "D",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 116,
"end": 121,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 118,
"end": 121,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": null,
"definite": false
}
]
}
]
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 126,
"end": 152,
"ctxt": 0
},
"expression": {
"type": "JSXElement",
"span": {
"start": 126,
"end": 152,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "JSXMemberExpression",
"object": {
"type": "JSXMemberExpression",
"object": {
"type": "JSXMemberExpression",
"object": {
"type": "Identifier",
"span": {
"start": 127,
"end": 128,
"ctxt": 0
},
"value": "A",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 129,
"end": 130,
"ctxt": 0
},
"value": "B",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 131,
"end": 132,
"ctxt": 0
},
"value": "C",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 133,
"end": 134,
"ctxt": 0
},
"value": "D",
"optional": false
}
},
"span": {
"start": 126,
"end": 135,
"ctxt": 0
},
"attributes": [],
"selfClosing": false,
"typeArguments": null
},
"children": [
{
"type": "JSXText",
"span": {
"start": 135,
"end": 138,
"ctxt": 0
},
"value": "foo",
"raw": "foo"
}
],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 138,
"end": 152,
"ctxt": 0
},
"name": {
"type": "JSXMemberExpression",
"object": {
"type": "JSXMemberExpression",
"object": {
"type": "JSXMemberExpression",
"object": {
"type": "Identifier",
"span": {
"start": 140,
"end": 141,
"ctxt": 0
},
"value": "A",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 144,
"end": 145,
"ctxt": 0
},
"value": "B",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 148,
"end": 149,
"ctxt": 0
},
"value": "C",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 150,
"end": 151,
"ctxt": 0
},
"value": "D",
"optional": false
}
}
}
}
}
],
"interpreter": null
}