mirror of
https://github.com/swc-project/swc.git
synced 2024-12-20 04:01:39 +03:00
843 lines
20 KiB
JSON
843 lines
20 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 40,
|
|
"end": 462,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "TsModuleDeclaration",
|
|
"span": {
|
|
"start": 40,
|
|
"end": 139,
|
|
"ctxt": 0
|
|
},
|
|
"declare": true,
|
|
"global": false,
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 55,
|
|
"end": 58,
|
|
"ctxt": 0
|
|
},
|
|
"value": "JSX",
|
|
"optional": false
|
|
},
|
|
"body": {
|
|
"type": "TsModuleBlock",
|
|
"span": {
|
|
"start": 59,
|
|
"end": 139,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "TsInterfaceDeclaration",
|
|
"span": {
|
|
"start": 62,
|
|
"end": 83,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 72,
|
|
"end": 79,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Element",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"typeParams": null,
|
|
"extends": [],
|
|
"body": {
|
|
"type": "TsInterfaceBody",
|
|
"span": {
|
|
"start": 80,
|
|
"end": 83,
|
|
"ctxt": 0
|
|
},
|
|
"body": []
|
|
}
|
|
},
|
|
{
|
|
"type": "TsInterfaceDeclaration",
|
|
"span": {
|
|
"start": 85,
|
|
"end": 137,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 95,
|
|
"end": 112,
|
|
"ctxt": 0
|
|
},
|
|
"value": "IntrinsicElements",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"typeParams": null,
|
|
"extends": [],
|
|
"body": {
|
|
"type": "TsInterfaceBody",
|
|
"span": {
|
|
"start": 113,
|
|
"end": 137,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "TsIndexSignature",
|
|
"params": [
|
|
{
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 118,
|
|
"end": 127,
|
|
"ctxt": 0
|
|
},
|
|
"value": "s",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 119,
|
|
"end": 127,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 121,
|
|
"end": 127,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 128,
|
|
"end": 133,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 130,
|
|
"end": 133,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "any"
|
|
}
|
|
},
|
|
"readonly": false,
|
|
"static": false,
|
|
"span": {
|
|
"start": 117,
|
|
"end": 134,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 140,
|
|
"end": 163,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": true,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 152,
|
|
"end": 162,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 152,
|
|
"end": 157,
|
|
"ctxt": 0
|
|
},
|
|
"value": "React",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 157,
|
|
"end": 162,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 159,
|
|
"end": 162,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "any"
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 165,
|
|
"end": 171,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "JSXFragment",
|
|
"span": {
|
|
"start": 165,
|
|
"end": 170,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningFragment",
|
|
"span": {
|
|
"start": 165,
|
|
"end": 167,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"children": [],
|
|
"closing": {
|
|
"type": "JSXClosingFragment",
|
|
"span": {
|
|
"start": 167,
|
|
"end": 170,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 189,
|
|
"end": 202,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "JSXFragment",
|
|
"span": {
|
|
"start": 189,
|
|
"end": 201,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningFragment",
|
|
"span": {
|
|
"start": 189,
|
|
"end": 195,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"children": [],
|
|
"closing": {
|
|
"type": "JSXClosingFragment",
|
|
"span": {
|
|
"start": 195,
|
|
"end": 201,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 225,
|
|
"end": 266,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "JSXFragment",
|
|
"span": {
|
|
"start": 225,
|
|
"end": 265,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningFragment",
|
|
"span": {
|
|
"start": 225,
|
|
"end": 246,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"children": [],
|
|
"closing": {
|
|
"type": "JSXClosingFragment",
|
|
"span": {
|
|
"start": 246,
|
|
"end": 265,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 291,
|
|
"end": 299,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "JSXFragment",
|
|
"span": {
|
|
"start": 291,
|
|
"end": 298,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningFragment",
|
|
"span": {
|
|
"start": 291,
|
|
"end": 293,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "JSXText",
|
|
"span": {
|
|
"start": 293,
|
|
"end": 295,
|
|
"ctxt": 0
|
|
},
|
|
"value": "hi",
|
|
"raw": "hi"
|
|
}
|
|
],
|
|
"closing": {
|
|
"type": "JSXClosingFragment",
|
|
"span": {
|
|
"start": 295,
|
|
"end": 298,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 315,
|
|
"end": 350,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "JSXFragment",
|
|
"span": {
|
|
"start": 315,
|
|
"end": 349,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningFragment",
|
|
"span": {
|
|
"start": 315,
|
|
"end": 317,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "JSXElement",
|
|
"span": {
|
|
"start": 317,
|
|
"end": 332,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningElement",
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 318,
|
|
"end": 322,
|
|
"ctxt": 0
|
|
},
|
|
"value": "span",
|
|
"optional": false
|
|
},
|
|
"span": {
|
|
"start": 317,
|
|
"end": 323,
|
|
"ctxt": 0
|
|
},
|
|
"attributes": [],
|
|
"selfClosing": false,
|
|
"typeArguments": null
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "JSXText",
|
|
"span": {
|
|
"start": 323,
|
|
"end": 325,
|
|
"ctxt": 0
|
|
},
|
|
"value": "hi",
|
|
"raw": "hi"
|
|
}
|
|
],
|
|
"closing": {
|
|
"type": "JSXClosingElement",
|
|
"span": {
|
|
"start": 325,
|
|
"end": 332,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 327,
|
|
"end": 331,
|
|
"ctxt": 0
|
|
},
|
|
"value": "span",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "JSXElement",
|
|
"span": {
|
|
"start": 332,
|
|
"end": 346,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningElement",
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 333,
|
|
"end": 336,
|
|
"ctxt": 0
|
|
},
|
|
"value": "div",
|
|
"optional": false
|
|
},
|
|
"span": {
|
|
"start": 332,
|
|
"end": 337,
|
|
"ctxt": 0
|
|
},
|
|
"attributes": [],
|
|
"selfClosing": false,
|
|
"typeArguments": null
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "JSXText",
|
|
"span": {
|
|
"start": 337,
|
|
"end": 340,
|
|
"ctxt": 0
|
|
},
|
|
"value": "bye",
|
|
"raw": "bye"
|
|
}
|
|
],
|
|
"closing": {
|
|
"type": "JSXClosingElement",
|
|
"span": {
|
|
"start": 340,
|
|
"end": 346,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 342,
|
|
"end": 345,
|
|
"ctxt": 0
|
|
},
|
|
"value": "div",
|
|
"optional": false
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"closing": {
|
|
"type": "JSXClosingFragment",
|
|
"span": {
|
|
"start": 346,
|
|
"end": 349,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 363,
|
|
"end": 434,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "JSXFragment",
|
|
"span": {
|
|
"start": 363,
|
|
"end": 433,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningFragment",
|
|
"span": {
|
|
"start": 363,
|
|
"end": 365,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "JSXElement",
|
|
"span": {
|
|
"start": 365,
|
|
"end": 379,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningElement",
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 366,
|
|
"end": 370,
|
|
"ctxt": 0
|
|
},
|
|
"value": "span",
|
|
"optional": false
|
|
},
|
|
"span": {
|
|
"start": 365,
|
|
"end": 371,
|
|
"ctxt": 0
|
|
},
|
|
"attributes": [],
|
|
"selfClosing": false,
|
|
"typeArguments": null
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "JSXText",
|
|
"span": {
|
|
"start": 371,
|
|
"end": 372,
|
|
"ctxt": 0
|
|
},
|
|
"value": "1",
|
|
"raw": "1"
|
|
}
|
|
],
|
|
"closing": {
|
|
"type": "JSXClosingElement",
|
|
"span": {
|
|
"start": 372,
|
|
"end": 379,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 374,
|
|
"end": 378,
|
|
"ctxt": 0
|
|
},
|
|
"value": "span",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "JSXFragment",
|
|
"span": {
|
|
"start": 379,
|
|
"end": 416,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningFragment",
|
|
"span": {
|
|
"start": 379,
|
|
"end": 381,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "JSXElement",
|
|
"span": {
|
|
"start": 381,
|
|
"end": 397,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningElement",
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 382,
|
|
"end": 386,
|
|
"ctxt": 0
|
|
},
|
|
"value": "span",
|
|
"optional": false
|
|
},
|
|
"span": {
|
|
"start": 381,
|
|
"end": 387,
|
|
"ctxt": 0
|
|
},
|
|
"attributes": [],
|
|
"selfClosing": false,
|
|
"typeArguments": null
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "JSXText",
|
|
"span": {
|
|
"start": 387,
|
|
"end": 390,
|
|
"ctxt": 0
|
|
},
|
|
"value": "2.1",
|
|
"raw": "2.1"
|
|
}
|
|
],
|
|
"closing": {
|
|
"type": "JSXClosingElement",
|
|
"span": {
|
|
"start": 390,
|
|
"end": 397,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 392,
|
|
"end": 396,
|
|
"ctxt": 0
|
|
},
|
|
"value": "span",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "JSXElement",
|
|
"span": {
|
|
"start": 397,
|
|
"end": 413,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningElement",
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 398,
|
|
"end": 402,
|
|
"ctxt": 0
|
|
},
|
|
"value": "span",
|
|
"optional": false
|
|
},
|
|
"span": {
|
|
"start": 397,
|
|
"end": 403,
|
|
"ctxt": 0
|
|
},
|
|
"attributes": [],
|
|
"selfClosing": false,
|
|
"typeArguments": null
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "JSXText",
|
|
"span": {
|
|
"start": 403,
|
|
"end": 406,
|
|
"ctxt": 0
|
|
},
|
|
"value": "2.2",
|
|
"raw": "2.2"
|
|
}
|
|
],
|
|
"closing": {
|
|
"type": "JSXClosingElement",
|
|
"span": {
|
|
"start": 406,
|
|
"end": 413,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 408,
|
|
"end": 412,
|
|
"ctxt": 0
|
|
},
|
|
"value": "span",
|
|
"optional": false
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"closing": {
|
|
"type": "JSXClosingFragment",
|
|
"span": {
|
|
"start": 413,
|
|
"end": 416,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "JSXElement",
|
|
"span": {
|
|
"start": 416,
|
|
"end": 430,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningElement",
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 417,
|
|
"end": 421,
|
|
"ctxt": 0
|
|
},
|
|
"value": "span",
|
|
"optional": false
|
|
},
|
|
"span": {
|
|
"start": 416,
|
|
"end": 422,
|
|
"ctxt": 0
|
|
},
|
|
"attributes": [],
|
|
"selfClosing": false,
|
|
"typeArguments": null
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "JSXText",
|
|
"span": {
|
|
"start": 422,
|
|
"end": 423,
|
|
"ctxt": 0
|
|
},
|
|
"value": "3",
|
|
"raw": "3"
|
|
}
|
|
],
|
|
"closing": {
|
|
"type": "JSXClosingElement",
|
|
"span": {
|
|
"start": 423,
|
|
"end": 430,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 425,
|
|
"end": 429,
|
|
"ctxt": 0
|
|
},
|
|
"value": "span",
|
|
"optional": false
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"closing": {
|
|
"type": "JSXClosingFragment",
|
|
"span": {
|
|
"start": 430,
|
|
"end": 433,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 455,
|
|
"end": 462,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "JSXFragment",
|
|
"span": {
|
|
"start": 455,
|
|
"end": 461,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningFragment",
|
|
"span": {
|
|
"start": 455,
|
|
"end": 457,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "JSXText",
|
|
"span": {
|
|
"start": 457,
|
|
"end": 458,
|
|
"ctxt": 0
|
|
},
|
|
"value": "#",
|
|
"raw": "#"
|
|
}
|
|
],
|
|
"closing": {
|
|
"type": "JSXClosingFragment",
|
|
"span": {
|
|
"start": 458,
|
|
"end": 461,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|