swc/ecmascript/parser/tests/jsx/basic/fragment-6/input.js.json
David Sherret 0d67d5d855 Fix JSX opening, closing, spread child, and expression container spans (#582)
swc_ecma_parser:
 - fix opening and closing jsx spans.
 - fix JSX expression.
 - fix JSX spread child.
2020-01-14 12:37:29 +09:00

135 lines
3.0 KiB
JSON

{
"type": "Module",
"span": {
"start": 0,
"end": 59,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 0,
"end": 59,
"ctxt": 0
},
"expression": {
"type": "JSXFragment",
"span": {
"start": 0,
"end": 59,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningFragment",
"span": {
"start": 0,
"end": 2,
"ctxt": 0
}
},
"children": [
{
"type": "JSXElement",
"span": {
"start": 2,
"end": 23,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 3,
"end": 6,
"ctxt": 0
},
"value": "div",
"typeAnnotation": null,
"optional": false
},
"span": {
"start": 2,
"end": 7,
"ctxt": 0
},
"attributes": [],
"selfClosing": false,
"typeArguments": null
},
"children": [
{
"type": "JSXText",
"span": {
"start": 7,
"end": 17,
"ctxt": 0
},
"value": "JSXElement",
"raw": "JSXElement"
}
],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 17,
"end": 23,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 19,
"end": 22,
"ctxt": 0
},
"value": "div",
"typeAnnotation": null,
"optional": false
}
}
},
{
"type": "JSXText",
"span": {
"start": 23,
"end": 30,
"ctxt": 0
},
"value": "JSXText",
"raw": "JSXText"
},
{
"type": "JSXExpressionContainer",
"span": {
"start": 30,
"end": 56,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 31,
"end": 55,
"ctxt": 0
},
"value": "JSXExpressionContainer",
"hasEscape": false
}
}
],
"closing": {
"type": "JSXClosingFragment",
"span": {
"start": 56,
"end": 59,
"ctxt": 0
}
}
}
}
],
"interpreter": null
}