swc/ecmascript/parser/tests/jsx/basic/19/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

164 lines
3.9 KiB
JSON

{
"type": "Module",
"span": {
"start": 0,
"end": 53,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 0,
"end": 53,
"ctxt": 0
},
"expression": {
"type": "JSXElement",
"span": {
"start": 0,
"end": 53,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 1,
"end": 4,
"ctxt": 0
},
"value": "div",
"typeAnnotation": null,
"optional": false
},
"span": {
"start": 0,
"end": 47,
"ctxt": 0
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 5,
"end": 18,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 5,
"end": 8,
"ctxt": 0
},
"value": "pre",
"typeAnnotation": null,
"optional": false
},
"value": {
"type": "JSXExpressionContainer",
"span": {
"start": 9,
"end": 9,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 9,
"end": 18,
"ctxt": 0
},
"value": "leading",
"hasEscape": false
}
}
},
{
"type": "JSXAttribute",
"span": {
"start": 19,
"end": 35,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 19,
"end": 23,
"ctxt": 0
},
"value": "pre2",
"typeAnnotation": null,
"optional": false
},
"value": {
"type": "JSXExpressionContainer",
"span": {
"start": 24,
"end": 24,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 24,
"end": 35,
"ctxt": 0
},
"value": "attribute",
"hasEscape": false
}
}
},
{
"type": "SpreadElement",
"spread": {
"start": 37,
"end": 40,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 40,
"end": 45,
"ctxt": 0
},
"value": "props",
"typeAnnotation": null,
"optional": false
}
}
],
"selfClosing": false,
"typeArguments": null
},
"children": [],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 47,
"end": 53,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 49,
"end": 52,
"ctxt": 0
},
"value": "div",
"typeAnnotation": null,
"optional": false
}
}
}
}
],
"interpreter": null
}