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

322 lines
7.4 KiB
JSON

{
"type": "File",
"start": 0,
"end": 53,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 53
}
},
"range": [
0,
53
],
"program": {
"type": "Program",
"start": 0,
"end": 53,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 53
}
},
"range": [
0,
53
],
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 53,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 53
}
},
"range": [
0,
53
],
"expression": {
"type": "JSXElement",
"start": 0,
"end": 53,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 53
}
},
"range": [
0,
53
],
"openingElement": {
"type": "JSXOpeningElement",
"start": 0,
"end": 47,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 47
}
},
"range": [
0,
47
],
"attributes": [
{
"type": "JSXAttribute",
"start": 5,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 5
},
"end": {
"line": 1,
"column": 18
}
},
"range": [
5,
18
],
"name": {
"type": "JSXIdentifier",
"start": 5,
"end": 8,
"loc": {
"start": {
"line": 1,
"column": 5
},
"end": {
"line": 1,
"column": 8
}
},
"range": [
5,
8
],
"name": "pre"
},
"value": {
"type": "Literal",
"start": 9,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 18
}
},
"range": [
9,
18
],
"value": "leading",
"rawValue": "leading",
"raw": "\"leading\""
}
},
{
"type": "JSXAttribute",
"start": 19,
"end": 35,
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 35
}
},
"range": [
19,
35
],
"name": {
"type": "JSXIdentifier",
"start": 19,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 23
}
},
"range": [
19,
23
],
"name": "pre2"
},
"value": {
"type": "Literal",
"start": 24,
"end": 35,
"loc": {
"start": {
"line": 1,
"column": 24
},
"end": {
"line": 1,
"column": 35
}
},
"range": [
24,
35
],
"value": "attribute",
"rawValue": "attribute",
"raw": "\"attribute\""
}
},
{
"type": "JSXSpreadAttribute",
"start": 36,
"end": 46,
"loc": {
"start": {
"line": 1,
"column": 36
},
"end": {
"line": 1,
"column": 46
}
},
"range": [
36,
46
],
"argument": {
"type": "Identifier",
"start": 40,
"end": 45,
"loc": {
"start": {
"line": 1,
"column": 40
},
"end": {
"line": 1,
"column": 45
}
},
"range": [
40,
45
],
"name": "props"
}
}
],
"name": {
"type": "JSXIdentifier",
"start": 1,
"end": 4,
"loc": {
"start": {
"line": 1,
"column": 1
},
"end": {
"line": 1,
"column": 4
}
},
"range": [
1,
4
],
"name": "div"
},
"selfClosing": false
},
"closingElement": {
"type": "JSXClosingElement",
"start": 47,
"end": 53,
"loc": {
"start": {
"line": 1,
"column": 47
},
"end": {
"line": 1,
"column": 53
}
},
"range": [
47,
53
],
"name": {
"type": "JSXIdentifier",
"start": 49,
"end": 52,
"loc": {
"start": {
"line": 1,
"column": 49
},
"end": {
"line": 1,
"column": 52
}
},
"range": [
49,
52
],
"name": "div"
}
},
"children": []
}
}
]
}
}