babel/test/fixtures/jsx/basic/4/expected.json

386 lines
9.4 KiB
JSON

{
"type": "File",
"start": 0,
"end": 40,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 40
}
},
"range": [
0,
40
],
"program": {
"type": "Program",
"start": 0,
"end": 40,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 40
}
},
"range": [
0,
40
],
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 40,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 40
}
},
"range": [
0,
40
],
"expression": {
"type": "JSXElement",
"start": 0,
"end": 40,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 40
}
},
"range": [
0,
40
],
"openingElement": {
"type": "JSXOpeningElement",
"start": 0,
"end": 40,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 40
}
},
"range": [
0,
40
],
"attributes": [
{
"type": "JSXAttribute",
"start": 3,
"end": 10,
"loc": {
"start": {
"line": 1,
"column": 3
},
"end": {
"line": 1,
"column": 10
}
},
"range": [
3,
10
],
"name": {
"type": "JSXIdentifier",
"start": 3,
"end": 4,
"loc": {
"start": {
"line": 1,
"column": 3
},
"end": {
"line": 1,
"column": 4
}
},
"range": [
3,
4
],
"name": "b"
},
"value": {
"type": "JSXExpressionContainer",
"start": 5,
"end": 10,
"loc": {
"start": {
"line": 1,
"column": 5
},
"end": {
"line": 1,
"column": 10
}
},
"range": [
5,
10
],
"expression": {
"type": "Literal",
"start": 6,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 9
}
},
"range": [
6,
9
],
"value": " ",
"rawValue": " ",
"raw": "\" \""
}
}
},
{
"type": "JSXAttribute",
"start": 11,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 11
},
"end": {
"line": 1,
"column": 16
}
},
"range": [
11,
16
],
"name": {
"type": "JSXIdentifier",
"start": 11,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 11
},
"end": {
"line": 1,
"column": 12
}
},
"range": [
11,
12
],
"name": "c"
},
"value": {
"type": "Literal",
"start": 13,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 13
},
"end": {
"line": 1,
"column": 16
}
},
"range": [
13,
16
],
"value": " ",
"rawValue": " ",
"raw": "\" \""
}
},
{
"type": "JSXAttribute",
"start": 17,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 26
}
},
"range": [
17,
26
],
"name": {
"type": "JSXIdentifier",
"start": 17,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 18
}
},
"range": [
17,
18
],
"name": "d"
},
"value": {
"type": "Literal",
"start": 19,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 26
}
},
"range": [
19,
26
],
"value": "&",
"rawValue": "&",
"raw": "\"&\""
}
},
{
"type": "JSXAttribute",
"start": 27,
"end": 37,
"loc": {
"start": {
"line": 1,
"column": 27
},
"end": {
"line": 1,
"column": 37
}
},
"range": [
27,
37
],
"name": {
"type": "JSXIdentifier",
"start": 27,
"end": 28,
"loc": {
"start": {
"line": 1,
"column": 27
},
"end": {
"line": 1,
"column": 28
}
},
"range": [
27,
28
],
"name": "e"
},
"value": {
"type": "Literal",
"start": 29,
"end": 37,
"loc": {
"start": {
"line": 1,
"column": 29
},
"end": {
"line": 1,
"column": 37
}
},
"range": [
29,
37
],
"value": "&ampr;",
"rawValue": "&ampr;",
"raw": "\"&ampr;\""
}
}
],
"name": {
"type": "JSXIdentifier",
"start": 1,
"end": 2,
"loc": {
"start": {
"line": 1,
"column": 1
},
"end": {
"line": 1,
"column": 2
}
},
"range": [
1,
2
],
"name": "a"
},
"selfClosing": true
},
"closingElement": null,
"children": []
}
}
]
}
}