mirror of
https://github.com/swc-project/swc.git
synced 2024-12-22 13:11:31 +03:00
30af06bb70
swc_ecmascript: - add `ExprStmt`. - change type of regex.expression and regex.flags.
198 lines
4.6 KiB
JSON
198 lines
4.6 KiB
JSON
{
|
|
"type": "Module",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 55,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 55,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "JSXFragment",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 55,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningFragment",
|
|
"span": {
|
|
"start": 2,
|
|
"end": 3,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "JSXText",
|
|
"span": {
|
|
"start": 3,
|
|
"end": 7,
|
|
"ctxt": 0
|
|
},
|
|
"value": "\n\r\n ",
|
|
"raw": "\n\r\n "
|
|
},
|
|
{
|
|
"type": "JSXElement",
|
|
"span": {
|
|
"start": 7,
|
|
"end": 32,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningElement",
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 8,
|
|
"end": 12,
|
|
"ctxt": 0
|
|
},
|
|
"value": "span",
|
|
"typeAnnotation": null,
|
|
"optional": false
|
|
},
|
|
"span": {
|
|
"start": 8,
|
|
"end": 13,
|
|
"ctxt": 0
|
|
},
|
|
"attributes": [],
|
|
"selfClosing": false,
|
|
"typeArguments": null
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "JSXText",
|
|
"span": {
|
|
"start": 13,
|
|
"end": 25,
|
|
"ctxt": 0
|
|
},
|
|
"value": "\n\r\n hi\n\r\n ",
|
|
"raw": "\n\r\n hi\n\r\n "
|
|
}
|
|
],
|
|
"closing": {
|
|
"type": "JSXClosingElement",
|
|
"span": {
|
|
"start": 27,
|
|
"end": 32,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 27,
|
|
"end": 31,
|
|
"ctxt": 0
|
|
},
|
|
"value": "span",
|
|
"typeAnnotation": null,
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "JSXText",
|
|
"span": {
|
|
"start": 32,
|
|
"end": 36,
|
|
"ctxt": 0
|
|
},
|
|
"value": "\n\r\n ",
|
|
"raw": "\n\r\n "
|
|
},
|
|
{
|
|
"type": "JSXElement",
|
|
"span": {
|
|
"start": 36,
|
|
"end": 50,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningElement",
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 37,
|
|
"end": 40,
|
|
"ctxt": 0
|
|
},
|
|
"value": "div",
|
|
"typeAnnotation": null,
|
|
"optional": false
|
|
},
|
|
"span": {
|
|
"start": 37,
|
|
"end": 41,
|
|
"ctxt": 0
|
|
},
|
|
"attributes": [],
|
|
"selfClosing": false,
|
|
"typeArguments": null
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "JSXText",
|
|
"span": {
|
|
"start": 41,
|
|
"end": 44,
|
|
"ctxt": 0
|
|
},
|
|
"value": "bye",
|
|
"raw": "bye"
|
|
}
|
|
],
|
|
"closing": {
|
|
"type": "JSXClosingElement",
|
|
"span": {
|
|
"start": 46,
|
|
"end": 50,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 46,
|
|
"end": 49,
|
|
"ctxt": 0
|
|
},
|
|
"value": "div",
|
|
"typeAnnotation": null,
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "JSXText",
|
|
"span": {
|
|
"start": 50,
|
|
"end": 52,
|
|
"ctxt": 0
|
|
},
|
|
"value": "\n\r\n",
|
|
"raw": "\n\r\n"
|
|
}
|
|
],
|
|
"closing": {
|
|
"type": "JSXClosingFragment",
|
|
"span": {
|
|
"start": 54,
|
|
"end": 55,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|