swc/ecmascript/parser/tests/jsx/basic/7/input.js.json
강동윤 30af06bb70
Ast (#513)
swc_ecmascript:
 - add `ExprStmt`.
 - change type of regex.expression and regex.flags.
2019-12-16 18:08:21 +09:00

111 lines
2.4 KiB
JSON

{
"type": "Module",
"span": {
"start": 0,
"end": 55,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 0,
"end": 55,
"ctxt": 0
},
"expression": {
"type": "JSXElement",
"span": {
"start": 0,
"end": 55,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 1,
"end": 8,
"ctxt": 0
},
"value": "AbC-def",
"typeAnnotation": null,
"optional": false
},
"span": {
"start": 1,
"end": 33,
"ctxt": 0
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 12,
"end": 32,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 12,
"end": 16,
"ctxt": 0
},
"value": "test",
"typeAnnotation": null,
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 17,
"end": 32,
"ctxt": 0
},
"value": "&&",
"hasEscape": false
}
}
],
"selfClosing": false,
"typeArguments": null
},
"children": [
{
"type": "JSXText",
"span": {
"start": 33,
"end": 45,
"ctxt": 0
},
"value": "\n\r\nbar\n\r\nbaz\n\r\n",
"raw": "\n\r\nbar\n\r\nbaz\n\r\n"
}
],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 47,
"end": 55,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 47,
"end": 54,
"ctxt": 0
},
"value": "AbC-def",
"typeAnnotation": null,
"optional": false
}
}
}
}
],
"interpreter": null
}