swc/ecmascript/parser/tests/jsx/basic/8/input.js.json
kdy1 96e1dbe213 Improve hygiene and use JSXAttrValue (#592)
swc_ecmacript:
 - use JSXAttrValue (Fixes #584)

swc_ecma_transforms:
 - make hygiene pass check for exported vars (Fixes #591)
2020-01-17 05:45:33 +00:00

163 lines
4.5 KiB
JSON

{
"type": "Module",
"span": {
"start": 0,
"end": 27,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 0,
"end": 27,
"ctxt": 0
},
"expression": {
"type": "JSXElement",
"span": {
"start": 0,
"end": 27,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "a",
"typeAnnotation": null,
"optional": false
},
"span": {
"start": 0,
"end": 27,
"ctxt": 0
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 3,
"end": 24,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 3,
"end": 4,
"ctxt": 0
},
"value": "b",
"typeAnnotation": null,
"optional": false
},
"value": {
"type": "JSXExpressionContainer",
"span": {
"start": 5,
"end": 24,
"ctxt": 0
},
"expression": {
"type": "ConditionalExpression",
"span": {
"start": 6,
"end": 23,
"ctxt": 0
},
"test": {
"type": "Identifier",
"span": {
"start": 6,
"end": 7,
"ctxt": 0
},
"value": "x",
"typeAnnotation": null,
"optional": false
},
"consequent": {
"type": "JSXElement",
"span": {
"start": 10,
"end": 15,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 11,
"end": 12,
"ctxt": 0
},
"value": "c",
"typeAnnotation": null,
"optional": false
},
"span": {
"start": 10,
"end": 15,
"ctxt": 0
},
"attributes": [],
"selfClosing": true,
"typeArguments": null
},
"children": [],
"closing": null
},
"alternate": {
"type": "JSXElement",
"span": {
"start": 18,
"end": 23,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 19,
"end": 20,
"ctxt": 0
},
"value": "d",
"typeAnnotation": null,
"optional": false
},
"span": {
"start": 18,
"end": 23,
"ctxt": 0
},
"attributes": [],
"selfClosing": true,
"typeArguments": null
},
"children": [],
"closing": null
}
}
}
}
],
"selfClosing": true,
"typeArguments": null
},
"children": [],
"closing": null
}
}
],
"interpreter": null
}