swc/crates/swc_estree_compat/tests/fixtures/jsx-map/output.json

684 lines
45 KiB
JSON
Raw Normal View History

{
"type": "File",
"start": 0,
"end": 124,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 7,
"column": 0
}
},
"errors": [],
"program": {
"type": "Program",
"start": 0,
"end": 124,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 7,
"column": 0
}
},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "VariableDeclaration",
"start": 0,
"end": 123,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 6,
"column": 2
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 6,
"end": 122,
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 6,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 6,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "App"
},
"name": "App"
},
"init": {
"type": "ArrowFunctionExpression",
"start": 12,
"end": 122,
"loc": {
"start": {
"line": 1,
"column": 12
},
"end": {
"line": 6,
"column": 1
}
},
"id": null,
"generator": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 18,
"end": 122,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 6,
"column": 1
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 24,
"end": 42,
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 22
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 28,
"end": 41,
"loc": {
"start": {
"line": 2,
"column": 8
},
"end": {
"line": 2,
"column": 21
}
},
"id": {
"type": "Identifier",
"start": 28,
"end": 29,
"loc": {
"start": {
"line": 2,
"column": 8
},
"end": {
"line": 2,
"column": 9
},
"identifierName": "a"
},
"name": "a"
},
"init": {
"type": "ArrayExpression",
"start": 32,
"end": 41,
"loc": {
"start": {
"line": 2,
"column": 12
},
"end": {
"line": 2,
"column": 21
}
},
"elements": [
{
"type": "NumericLiteral",
"start": 33,
"end": 34,
"loc": {
"start": {
"line": 2,
"column": 13
},
"end": {
"line": 2,
"column": 14
}
},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
},
{
"type": "NumericLiteral",
"start": 36,
"end": 37,
"loc": {
"start": {
"line": 2,
"column": 16
},
"end": {
"line": 2,
"column": 17
}
},
"extra": {
"rawValue": 2,
"raw": "2"
},
"value": 2
},
{
"type": "NumericLiteral",
"start": 39,
"end": 40,
"loc": {
"start": {
"line": 2,
"column": 19
},
"end": {
"line": 2,
"column": 20
}
},
"extra": {
"rawValue": 3,
"raw": "3"
},
"value": 3
}
]
}
}
],
"kind": "let"
},
{
"type": "ReturnStatement",
"start": 47,
"end": 120,
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 5,
"column": 9
}
},
"argument": {
"type": "JSXElement",
"start": 54,
"end": 120,
"loc": {
"start": {
"line": 3,
"column": 11
},
"end": {
"line": 5,
"column": 9
}
},
"openingElement": {
"type": "JSXOpeningElement",
"start": 54,
"end": 58,
"loc": {
"start": {
"line": 3,
"column": 11
},
"end": {
"line": 3,
"column": 15
}
},
"name": {
"type": "JSXIdentifier",
"start": 55,
"end": 57,
"loc": {
"start": {
"line": 3,
"column": 12
},
"end": {
"line": 3,
"column": 14
}
},
"name": "ul"
},
"attributes": [],
"selfClosing": false
},
"closingElement": {
"type": "JSXClosingElement",
"start": 115,
"end": 120,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 9
}
},
"name": {
"type": "JSXIdentifier",
"start": 117,
"end": 119,
"loc": {
"start": {
"line": 5,
"column": 6
},
"end": {
"line": 5,
"column": 8
}
},
"name": "ul"
}
},
"children": [
{
"type": "JSXText",
"start": 58,
"end": 67,
"loc": {
"start": {
"line": 3,
"column": 15
},
"end": {
"line": 4,
"column": 8
}
},
"extra": {
"rawValue": "\n ",
"raw": "\n "
},
"value": "\n "
},
{
"type": "JSXExpressionContainer",
"start": 67,
"end": 110,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 51
}
},
"expression": {
"type": "CallExpression",
"start": 68,
"end": 109,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 50
}
},
"callee": {
"type": "MemberExpression",
"start": 68,
"end": 73,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 14
}
},
"object": {
"type": "Identifier",
"start": 68,
"end": 69,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 10
},
"identifierName": "a"
},
"name": "a"
},
"computed": false,
"property": {
"type": "Identifier",
"start": 70,
"end": 73,
"loc": {
"start": {
"line": 4,
"column": 11
},
"end": {
"line": 4,
"column": 14
},
"identifierName": "map"
},
"name": "map"
}
},
"arguments": [
{
"type": "ArrowFunctionExpression",
"start": 74,
"end": 108,
"loc": {
"start": {
"line": 4,
"column": 15
},
"end": {
"line": 4,
"column": 49
}
},
"id": null,
"generator": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 74,
"end": 78,
"loc": {
"start": {
"line": 4,
"column": 15
},
"end": {
"line": 4,
"column": 19
},
"identifierName": "item"
},
"name": "item"
}
],
"body": {
"type": "JSXElement",
"start": 82,
"end": 108,
"loc": {
"start": {
"line": 4,
"column": 23
},
"end": {
"line": 4,
"column": 49
}
},
"openingElement": {
"type": "JSXOpeningElement",
"start": 82,
"end": 97,
"loc": {
"start": {
"line": 4,
"column": 23
},
"end": {
"line": 4,
"column": 38
}
},
"name": {
"type": "JSXIdentifier",
"start": 83,
"end": 85,
"loc": {
"start": {
"line": 4,
"column": 24
},
"end": {
"line": 4,
"column": 26
}
},
"name": "li"
},
"attributes": [
{
"type": "JSXAttribute",
"start": 86,
"end": 96,
"loc": {
"start": {
"line": 4,
"column": 27
},
"end": {
"line": 4,
"column": 37
}
},
"name": {
"type": "JSXIdentifier",
"start": 86,
"end": 89,
"loc": {
"start": {
"line": 4,
"column": 27
},
"end": {
"line": 4,
"column": 30
}
},
"name": "key"
},
"value": {
"type": "JSXExpressionContainer",
"start": 90,
"end": 96,
"loc": {
"start": {
"line": 4,
"column": 31
},
"end": {
"line": 4,
"column": 37
}
},
"expression": {
"type": "Identifier",
"start": 91,
"end": 95,
"loc": {
"start": {
"line": 4,
"column": 32
},
"end": {
"line": 4,
"column": 36
},
"identifierName": "item"
},
"name": "item"
}
}
}
],
"selfClosing": false
},
"closingElement": {
"type": "JSXClosingElement",
"start": 103,
"end": 108,
"loc": {
"start": {
"line": 4,
"column": 44
},
"end": {
"line": 4,
"column": 49
}
},
"name": {
"type": "JSXIdentifier",
"start": 105,
"end": 107,
"loc": {
"start": {
"line": 4,
"column": 46
},
"end": {
"line": 4,
"column": 48
}
},
"name": "li"
}
},
"children": [
{
"type": "JSXExpressionContainer",
"start": 97,
"end": 103,
"loc": {
"start": {
"line": 4,
"column": 38
},
"end": {
"line": 4,
"column": 44
}
},
"expression": {
"type": "Identifier",
"start": 98,
"end": 102,
"loc": {
"start": {
"line": 4,
"column": 39
},
"end": {
"line": 4,
"column": 43
},
"identifierName": "item"
},
"name": "item"
}
}
]
}
}
]
}
},
{
"type": "JSXText",
"start": 110,
"end": 115,
"loc": {
"start": {
"line": 4,
"column": 51
},
"end": {
"line": 5,
"column": 4
}
},
"extra": {
"rawValue": "\n ",
"raw": "\n "
},
"value": "\n "
}
]
}
}
],
"directives": []
}
}
}
],
"kind": "const"
}
],
"directives": []
},
"comments": []
}