mirror of
https://github.com/swc-project/swc.git
synced 2024-12-20 12:12:16 +03:00
76ce98b685
swc_common: - implement Serialize / Deserialize for span swc_ecma_parser: - use json instead of {:#?} while testing - update test references
110 lines
2.4 KiB
JSON
110 lines
2.4 KiB
JSON
{
|
|
"type": "Module",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 34,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"ident": {
|
|
"span": {
|
|
"start": 9,
|
|
"end": 10,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"typeAnnotation": null,
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"type": "Function",
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 0,
|
|
"end": 34,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 13,
|
|
"end": 34,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 17,
|
|
"end": 22,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 21,
|
|
"end": 22,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"span": {
|
|
"start": 21,
|
|
"end": 22,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"typeAnnotation": null,
|
|
"optional": false
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "JSXElement",
|
|
"span": {
|
|
"start": 25,
|
|
"end": 32,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningElement",
|
|
"name": {
|
|
"span": {
|
|
"start": 26,
|
|
"end": 29,
|
|
"ctxt": 0
|
|
},
|
|
"value": "div",
|
|
"typeAnnotation": null,
|
|
"optional": false
|
|
},
|
|
"span": {
|
|
"start": 26,
|
|
"end": 32,
|
|
"ctxt": 0
|
|
},
|
|
"attributes": [],
|
|
"selfClosing": true,
|
|
"typeArguments": null
|
|
},
|
|
"children": [],
|
|
"closing": null
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
}
|
|
],
|
|
"shebang": null
|
|
}
|