mirror of
https://github.com/swc-project/swc.git
synced 2024-12-22 05:01:42 +03:00
0d67d5d855
swc_ecma_parser: - fix opening and closing jsx spans. - fix JSX expression. - fix JSX spread child.
148 lines
3.4 KiB
JSON
148 lines
3.4 KiB
JSON
{
|
|
"type": "Module",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 49,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 49,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "JSXFragment",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 49,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningFragment",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 2,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "JSXText",
|
|
"span": {
|
|
"start": 2,
|
|
"end": 5,
|
|
"ctxt": 0
|
|
},
|
|
"value": "\n\n ",
|
|
"raw": "\n\n "
|
|
},
|
|
{
|
|
"type": "JSXFragment",
|
|
"span": {
|
|
"start": 5,
|
|
"end": 45,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningFragment",
|
|
"span": {
|
|
"start": 5,
|
|
"end": 7,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "JSXText",
|
|
"span": {
|
|
"start": 7,
|
|
"end": 12,
|
|
"ctxt": 0
|
|
},
|
|
"value": "\n\n ",
|
|
"raw": "\n\n "
|
|
},
|
|
{
|
|
"type": "JSXFragment",
|
|
"span": {
|
|
"start": 12,
|
|
"end": 39,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningFragment",
|
|
"span": {
|
|
"start": 12,
|
|
"end": 14,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "JSXText",
|
|
"span": {
|
|
"start": 14,
|
|
"end": 36,
|
|
"ctxt": 0
|
|
},
|
|
"value": "\n\n super deep\n\n ",
|
|
"raw": "\n\n super deep\n\n "
|
|
}
|
|
],
|
|
"closing": {
|
|
"type": "JSXClosingFragment",
|
|
"span": {
|
|
"start": 36,
|
|
"end": 39,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "JSXText",
|
|
"span": {
|
|
"start": 39,
|
|
"end": 42,
|
|
"ctxt": 0
|
|
},
|
|
"value": "\n\n ",
|
|
"raw": "\n\n "
|
|
}
|
|
],
|
|
"closing": {
|
|
"type": "JSXClosingFragment",
|
|
"span": {
|
|
"start": 42,
|
|
"end": 45,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "JSXText",
|
|
"span": {
|
|
"start": 45,
|
|
"end": 46,
|
|
"ctxt": 0
|
|
},
|
|
"value": "\n\n",
|
|
"raw": "\n\n"
|
|
}
|
|
],
|
|
"closing": {
|
|
"type": "JSXClosingFragment",
|
|
"span": {
|
|
"start": 46,
|
|
"end": 49,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|