mirror of
https://github.com/swc-project/swc.git
synced 2024-11-30 15:23:33 +03:00
7b3e5b3f61
**Description:** The identifier in the `prop` field of `MemberExpr` does not need information like `optional` or `ctxt`.
289 lines
8.0 KiB
JSON
289 lines
8.0 KiB
JSON
{
|
|
"type": "Module",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 100
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 49
|
|
},
|
|
"ctxt": 0,
|
|
"kind": "const",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 7,
|
|
"end": 48
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 7,
|
|
"end": 8
|
|
},
|
|
"ctxt": 0,
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "JSXElement",
|
|
"span": {
|
|
"start": 11,
|
|
"end": 48
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningElement",
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 12,
|
|
"end": 15
|
|
},
|
|
"ctxt": 0,
|
|
"value": "div",
|
|
"optional": false
|
|
},
|
|
"span": {
|
|
"start": 11,
|
|
"end": 42
|
|
},
|
|
"attributes": [
|
|
{
|
|
"type": "JSXAttribute",
|
|
"span": {
|
|
"start": 16,
|
|
"end": 41
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 16,
|
|
"end": 23
|
|
},
|
|
"value": "onclick"
|
|
},
|
|
"value": {
|
|
"type": "JSXExpressionContainer",
|
|
"span": {
|
|
"start": 24,
|
|
"end": 41
|
|
},
|
|
"expression": {
|
|
"type": "ObjectExpression",
|
|
"span": {
|
|
"start": 25,
|
|
"end": 40
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "KeyValueProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 27,
|
|
"end": 28
|
|
},
|
|
"value": "t"
|
|
},
|
|
"value": {
|
|
"type": "TemplateLiteral",
|
|
"span": {
|
|
"start": 30,
|
|
"end": 38
|
|
},
|
|
"expressions": [],
|
|
"quasis": [
|
|
{
|
|
"type": "TemplateElement",
|
|
"span": {
|
|
"start": 31,
|
|
"end": 37
|
|
},
|
|
"tail": true,
|
|
"cooked": "\\uD800",
|
|
"raw": "\\uD800"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"selfClosing": false,
|
|
"typeArguments": null
|
|
},
|
|
"children": [],
|
|
"closing": {
|
|
"type": "JSXClosingElement",
|
|
"span": {
|
|
"start": 42,
|
|
"end": 48
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 44,
|
|
"end": 47
|
|
},
|
|
"ctxt": 0,
|
|
"value": "div",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 50,
|
|
"end": 100
|
|
},
|
|
"ctxt": 0,
|
|
"kind": "const",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 56,
|
|
"end": 99
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 56,
|
|
"end": 57
|
|
},
|
|
"ctxt": 0,
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "JSXElement",
|
|
"span": {
|
|
"start": 60,
|
|
"end": 99
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningElement",
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 61,
|
|
"end": 64
|
|
},
|
|
"ctxt": 0,
|
|
"value": "div",
|
|
"optional": false
|
|
},
|
|
"span": {
|
|
"start": 60,
|
|
"end": 93
|
|
},
|
|
"attributes": [
|
|
{
|
|
"type": "JSXAttribute",
|
|
"span": {
|
|
"start": 65,
|
|
"end": 92
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 65,
|
|
"end": 72
|
|
},
|
|
"value": "onclick"
|
|
},
|
|
"value": {
|
|
"type": "JSXExpressionContainer",
|
|
"span": {
|
|
"start": 73,
|
|
"end": 92
|
|
},
|
|
"expression": {
|
|
"type": "ObjectExpression",
|
|
"span": {
|
|
"start": 74,
|
|
"end": 91
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "KeyValueProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 76,
|
|
"end": 77
|
|
},
|
|
"value": "t"
|
|
},
|
|
"value": {
|
|
"type": "TemplateLiteral",
|
|
"span": {
|
|
"start": 79,
|
|
"end": 89
|
|
},
|
|
"expressions": [],
|
|
"quasis": [
|
|
{
|
|
"type": "TemplateElement",
|
|
"span": {
|
|
"start": 80,
|
|
"end": 88
|
|
},
|
|
"tail": true,
|
|
"cooked": "\\u{D800}",
|
|
"raw": "\\u{D800}"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"selfClosing": false,
|
|
"typeArguments": null
|
|
},
|
|
"children": [],
|
|
"closing": {
|
|
"type": "JSXClosingElement",
|
|
"span": {
|
|
"start": 93,
|
|
"end": 99
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 95,
|
|
"end": 98
|
|
},
|
|
"ctxt": 0,
|
|
"value": "div",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|