update babylon fixtures to use File as the root node rather than Program
This commit is contained in:
550
test/fixtures/jsx/basic/19/expected.json
vendored
550
test/fixtures/jsx/basic/19/expected.json
vendored
@@ -1,231 +1,45 @@
|
||||
{
|
||||
"type": "Program",
|
||||
"body": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"expression": {
|
||||
"type": "JSXElement",
|
||||
"openingElement": {
|
||||
"type": "JSXOpeningElement",
|
||||
"name": {
|
||||
"type": "JSXIdentifier",
|
||||
"name": "div",
|
||||
"range": [
|
||||
1,
|
||||
4
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 1
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 4
|
||||
}
|
||||
}
|
||||
},
|
||||
"selfClosing": false,
|
||||
"attributes": [
|
||||
{
|
||||
"type": "JSXAttribute",
|
||||
"name": {
|
||||
"type": "JSXIdentifier",
|
||||
"name": "pre",
|
||||
"range": [
|
||||
5,
|
||||
8
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 8
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "Literal",
|
||||
"value": "leading",
|
||||
"raw": "\"leading\"",
|
||||
"range": [
|
||||
9,
|
||||
18
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 9
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 18
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
5,
|
||||
18
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 18
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "JSXAttribute",
|
||||
"name": {
|
||||
"type": "JSXIdentifier",
|
||||
"name": "pre2",
|
||||
"range": [
|
||||
19,
|
||||
23
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 19
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 23
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "Literal",
|
||||
"value": "attribute",
|
||||
"raw": "\"attribute\"",
|
||||
"range": [
|
||||
24,
|
||||
35
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 24
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 35
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
19,
|
||||
35
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 19
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 35
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "JSXSpreadAttribute",
|
||||
"argument": {
|
||||
"type": "Identifier",
|
||||
"name": "props",
|
||||
"range": [
|
||||
40,
|
||||
45
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 40
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 45
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
36,
|
||||
46
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 36
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 46
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
0,
|
||||
47
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 47
|
||||
}
|
||||
}
|
||||
},
|
||||
"closingElement": {
|
||||
"type": "JSXClosingElement",
|
||||
"name": {
|
||||
"type": "JSXIdentifier",
|
||||
"name": "div",
|
||||
"range": [
|
||||
49,
|
||||
52
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 49
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 52
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
47,
|
||||
53
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 47
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 53
|
||||
}
|
||||
}
|
||||
},
|
||||
"children": [],
|
||||
"range": [
|
||||
0,
|
||||
53
|
||||
],
|
||||
"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,
|
||||
@@ -235,22 +49,274 @@
|
||||
"line": 1,
|
||||
"column": 53
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
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": []
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user