swc/ecmascript/parser/tests/jsx/basic/4/input.js.json
강동윤 76ce98b685
Implement serialize for ast nodes (#244)
swc_common:
 - implement Serialize / Deserialize for span

swc_ecma_parser:
 - use json instead of {:#?} while testing
 - update test references
2019-02-20 11:35:41 +09:00

156 lines
3.4 KiB
JSON

{
"type": "Module",
"span": {
"start": 0,
"end": 40,
"ctxt": 0
},
"body": [
{
"type": "JSXElement",
"span": {
"start": 0,
"end": 40,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "a",
"typeAnnotation": null,
"optional": false
},
"span": {
"start": 1,
"end": 40,
"ctxt": 0
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 3,
"end": 10,
"ctxt": 0
},
"name": {
"span": {
"start": 3,
"end": 4,
"ctxt": 0
},
"value": "b",
"typeAnnotation": null,
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 6,
"end": 9,
"ctxt": 0
},
"value": " ",
"hasEscape": false
}
},
{
"type": "JSXAttribute",
"span": {
"start": 11,
"end": 16,
"ctxt": 0
},
"name": {
"span": {
"start": 11,
"end": 12,
"ctxt": 0
},
"value": "c",
"typeAnnotation": null,
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 13,
"end": 16,
"ctxt": 0
},
"value": " ",
"hasEscape": false
}
},
{
"type": "JSXAttribute",
"span": {
"start": 17,
"end": 26,
"ctxt": 0
},
"name": {
"span": {
"start": 17,
"end": 18,
"ctxt": 0
},
"value": "d",
"typeAnnotation": null,
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 19,
"end": 26,
"ctxt": 0
},
"value": "&",
"hasEscape": false
}
},
{
"type": "JSXAttribute",
"span": {
"start": 27,
"end": 37,
"ctxt": 0
},
"name": {
"span": {
"start": 27,
"end": 28,
"ctxt": 0
},
"value": "e",
"typeAnnotation": null,
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 29,
"end": 37,
"ctxt": 0
},
"value": "&ampr;",
"hasEscape": false
}
}
],
"selfClosing": true,
"typeArguments": null
},
"children": [],
"closing": null
}
],
"shebang": null
}