babel/test/fixtures/jsx/basic/3/expected.json
2015-07-25 05:19:32 +01:00

423 lines
9.8 KiB
JSON

{
"type": "Program",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "JSXElement",
"openingElement": {
"type": "JSXOpeningElement",
"name": {
"type": "JSXIdentifier",
"name": "a",
"range": [
1,
2
],
"loc": {
"start": {
"line": 1,
"column": 1
},
"end": {
"line": 1,
"column": 2
}
}
},
"selfClosing": false,
"attributes": [
{
"type": "JSXAttribute",
"name": {
"type": "JSXNamespacedName",
"namespace": {
"type": "JSXIdentifier",
"name": "n",
"range": [
3,
4
],
"loc": {
"start": {
"line": 1,
"column": 3
},
"end": {
"line": 1,
"column": 4
}
}
},
"name": {
"type": "JSXIdentifier",
"name": "foo",
"range": [
5,
8
],
"loc": {
"start": {
"line": 1,
"column": 5
},
"end": {
"line": 1,
"column": 8
}
}
},
"range": [
3,
8
],
"loc": {
"start": {
"line": 1,
"column": 3
},
"end": {
"line": 1,
"column": 8
}
}
},
"value": {
"type": "Literal",
"value": "bar",
"raw": "\"bar\"",
"range": [
9,
14
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 14
}
}
},
"range": [
3,
14
],
"loc": {
"start": {
"line": 1,
"column": 3
},
"end": {
"line": 1,
"column": 14
}
}
}
],
"range": [
0,
15
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 15
}
}
},
"closingElement": {
"type": "JSXClosingElement",
"name": {
"type": "JSXIdentifier",
"name": "a",
"range": [
38,
39
],
"loc": {
"start": {
"line": 1,
"column": 38
},
"end": {
"line": 1,
"column": 39
}
}
},
"range": [
36,
40
],
"loc": {
"start": {
"line": 1,
"column": 36
},
"end": {
"line": 1,
"column": 40
}
}
},
"children": [
{
"type": "Literal",
"value": " ",
"raw": " ",
"range": [
15,
16
],
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 16
}
}
},
{
"type": "JSXExpressionContainer",
"expression": {
"type": "Identifier",
"name": "value",
"range": [
17,
22
],
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 22
}
}
},
"range": [
16,
23
],
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 23
}
}
},
{
"type": "Literal",
"value": " ",
"raw": " ",
"range": [
23,
24
],
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 24
}
}
},
{
"type": "JSXElement",
"openingElement": {
"type": "JSXOpeningElement",
"name": {
"type": "JSXIdentifier",
"name": "b",
"range": [
25,
26
],
"loc": {
"start": {
"line": 1,
"column": 25
},
"end": {
"line": 1,
"column": 26
}
}
},
"selfClosing": false,
"attributes": [],
"range": [
24,
27
],
"loc": {
"start": {
"line": 1,
"column": 24
},
"end": {
"line": 1,
"column": 27
}
}
},
"closingElement": {
"type": "JSXClosingElement",
"name": {
"type": "JSXIdentifier",
"name": "b",
"range": [
34,
35
],
"loc": {
"start": {
"line": 1,
"column": 34
},
"end": {
"line": 1,
"column": 35
}
}
},
"range": [
32,
36
],
"loc": {
"start": {
"line": 1,
"column": 32
},
"end": {
"line": 1,
"column": 36
}
}
},
"children": [
{
"type": "JSXElement",
"openingElement": {
"type": "JSXOpeningElement",
"name": {
"type": "JSXIdentifier",
"name": "c",
"range": [
28,
29
],
"loc": {
"start": {
"line": 1,
"column": 28
},
"end": {
"line": 1,
"column": 29
}
}
},
"selfClosing": true,
"attributes": [],
"range": [
27,
32
],
"loc": {
"start": {
"line": 1,
"column": 27
},
"end": {
"line": 1,
"column": 32
}
}
},
"closingElement": null,
"children": [],
"range": [
27,
32
],
"loc": {
"start": {
"line": 1,
"column": 27
},
"end": {
"line": 1,
"column": 32
}
}
}
],
"range": [
24,
36
],
"loc": {
"start": {
"line": 1,
"column": 24
},
"end": {
"line": 1,
"column": 36
}
}
}
],
"range": [
0,
40
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 40
}
}
},
"range": [
0,
40
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 40
}
}
}
]
}