swc/ecmascript/parser/tests/jsx/basic/3/input.js.json
강동윤 eaeffabf74
fix(es): Improve performance (#1411)
swc_ecma_ast:
 - Add `BindingIdent`.
 - Reduce size of `Ident`.
2021-02-19 15:34:22 +09:00

233 lines
5.6 KiB
JSON

{
"type": "Module",
"span": {
"start": 0,
"end": 40,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 0,
"end": 40,
"ctxt": 0
},
"expression": {
"type": "JSXElement",
"span": {
"start": 0,
"end": 40,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "a",
"optional": false
},
"span": {
"start": 0,
"end": 15,
"ctxt": 0
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 3,
"end": 14,
"ctxt": 0
},
"name": {
"type": "JSXNamespacedName",
"namespace": {
"type": "Identifier",
"span": {
"start": 3,
"end": 4,
"ctxt": 0
},
"value": "n",
"optional": false
},
"name": {
"type": "Identifier",
"span": {
"start": 5,
"end": 8,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"value": {
"type": "StringLiteral",
"span": {
"start": 9,
"end": 14,
"ctxt": 0
},
"value": "bar",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"selfClosing": false,
"typeArguments": null
},
"children": [
{
"type": "JSXText",
"span": {
"start": 15,
"end": 16,
"ctxt": 0
},
"value": " ",
"raw": " "
},
{
"type": "JSXExpressionContainer",
"span": {
"start": 16,
"end": 23,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 17,
"end": 22,
"ctxt": 0
},
"value": "value",
"optional": false
}
},
{
"type": "JSXText",
"span": {
"start": 23,
"end": 24,
"ctxt": 0
},
"value": " ",
"raw": " "
},
{
"type": "JSXElement",
"span": {
"start": 24,
"end": 36,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 25,
"end": 26,
"ctxt": 0
},
"value": "b",
"optional": false
},
"span": {
"start": 24,
"end": 27,
"ctxt": 0
},
"attributes": [],
"selfClosing": false,
"typeArguments": null
},
"children": [
{
"type": "JSXElement",
"span": {
"start": 27,
"end": 32,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 28,
"end": 29,
"ctxt": 0
},
"value": "c",
"optional": false
},
"span": {
"start": 27,
"end": 32,
"ctxt": 0
},
"attributes": [],
"selfClosing": true,
"typeArguments": null
},
"children": [],
"closing": null
}
],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 32,
"end": 36,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 34,
"end": 35,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
}
],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 36,
"end": 40,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 38,
"end": 39,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
}
}
],
"interpreter": null
}