swc/crates/swc_ecma_parser/tests/jsx/basic/string/input.js.json
2022-03-28 12:18:06 +00:00

292 lines
7.9 KiB
JSON

{
"type": "Module",
"span": {
"start": 0,
"end": 99,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 0,
"end": 48,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 6,
"end": 47,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 6,
"end": 7,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "JSXElement",
"span": {
"start": 10,
"end": 47,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 11,
"end": 14,
"ctxt": 0
},
"value": "div",
"optional": false
},
"span": {
"start": 10,
"end": 41,
"ctxt": 0
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 15,
"end": 40,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 15,
"end": 22,
"ctxt": 0
},
"value": "onclick",
"optional": false
},
"value": {
"type": "JSXExpressionContainer",
"span": {
"start": 23,
"end": 40,
"ctxt": 0
},
"expression": {
"type": "ObjectExpression",
"span": {
"start": 24,
"end": 39,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 26,
"end": 27,
"ctxt": 0
},
"value": "s",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 29,
"end": 37,
"ctxt": 0
},
"value": "\\uD800",
"raw": "\"\\uD800\""
}
}
]
}
}
}
],
"selfClosing": false,
"typeArguments": null
},
"children": [],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 41,
"end": 47,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 43,
"end": 46,
"ctxt": 0
},
"value": "div",
"optional": false
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 49,
"end": 99,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 55,
"end": 98,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 55,
"end": 56,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "JSXElement",
"span": {
"start": 59,
"end": 98,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 60,
"end": 63,
"ctxt": 0
},
"value": "div",
"optional": false
},
"span": {
"start": 59,
"end": 92,
"ctxt": 0
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 64,
"end": 91,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 64,
"end": 71,
"ctxt": 0
},
"value": "onclick",
"optional": false
},
"value": {
"type": "JSXExpressionContainer",
"span": {
"start": 72,
"end": 91,
"ctxt": 0
},
"expression": {
"type": "ObjectExpression",
"span": {
"start": 73,
"end": 90,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 75,
"end": 76,
"ctxt": 0
},
"value": "s",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 78,
"end": 88,
"ctxt": 0
},
"value": "\\u{D800}",
"raw": "\"\\u{D800}\""
}
}
]
}
}
}
],
"selfClosing": false,
"typeArguments": null
},
"children": [],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 92,
"end": 98,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 94,
"end": 97,
"ctxt": 0
},
"value": "div",
"optional": false
}
}
},
"definite": false
}
]
}
],
"interpreter": null
}