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

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
}