mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 12:41:54 +03:00
76ce98b685
swc_common: - implement Serialize / Deserialize for span swc_ecma_parser: - use json instead of {:#?} while testing - update test references
135 lines
2.9 KiB
JSON
135 lines
2.9 KiB
JSON
{
|
|
"type": "Module",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 53,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "JSXElement",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 53,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningElement",
|
|
"name": {
|
|
"span": {
|
|
"start": 1,
|
|
"end": 4,
|
|
"ctxt": 0
|
|
},
|
|
"value": "div",
|
|
"typeAnnotation": null,
|
|
"optional": false
|
|
},
|
|
"span": {
|
|
"start": 1,
|
|
"end": 47,
|
|
"ctxt": 0
|
|
},
|
|
"attributes": [
|
|
{
|
|
"type": "JSXAttribute",
|
|
"span": {
|
|
"start": 5,
|
|
"end": 18,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"span": {
|
|
"start": 5,
|
|
"end": 8,
|
|
"ctxt": 0
|
|
},
|
|
"value": "pre",
|
|
"typeAnnotation": null,
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 9,
|
|
"end": 18,
|
|
"ctxt": 0
|
|
},
|
|
"value": "leading",
|
|
"hasEscape": false
|
|
}
|
|
},
|
|
{
|
|
"type": "JSXAttribute",
|
|
"span": {
|
|
"start": 19,
|
|
"end": 35,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"span": {
|
|
"start": 19,
|
|
"end": 23,
|
|
"ctxt": 0
|
|
},
|
|
"value": "pre2",
|
|
"typeAnnotation": null,
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 24,
|
|
"end": 35,
|
|
"ctxt": 0
|
|
},
|
|
"value": "attribute",
|
|
"hasEscape": false
|
|
}
|
|
},
|
|
{
|
|
"type": "SpreadElement",
|
|
"spread": {
|
|
"start": 37,
|
|
"end": 40,
|
|
"ctxt": 0
|
|
},
|
|
"arguments": {
|
|
"span": {
|
|
"start": 40,
|
|
"end": 45,
|
|
"ctxt": 0
|
|
},
|
|
"value": "props",
|
|
"typeAnnotation": null,
|
|
"optional": false
|
|
}
|
|
}
|
|
],
|
|
"selfClosing": false,
|
|
"typeArguments": null
|
|
},
|
|
"children": [],
|
|
"closing": {
|
|
"type": "JSXClosingElement",
|
|
"span": {
|
|
"start": 49,
|
|
"end": 53,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"span": {
|
|
"start": 49,
|
|
"end": 52,
|
|
"ctxt": 0
|
|
},
|
|
"value": "div",
|
|
"typeAnnotation": null,
|
|
"optional": false
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"shebang": null
|
|
}
|