update babylon fixtures to use File as the root node rather than Program

This commit is contained in:
Sebastian McKenzie
2015-07-25 05:24:58 +01:00
parent b088f8e6ef
commit 006f3db76a
800 changed files with 121059 additions and 73665 deletions

View File

@@ -1,58 +1,100 @@
{
"type": "Program",
"body": [
{
"type": "DeclareModule",
"id": {
"type": "Identifier",
"name": "A",
"range": [
15,
16
],
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 16
}
}
"type": "File",
"start": 0,
"end": 19,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 19
}
},
"range": [
0,
19
],
"program": {
"type": "Program",
"start": 0,
"end": 19,
"loc": {
"start": {
"line": 1,
"column": 0
},
"body": {
"type": "BlockStatement",
"body": [],
"range": [
17,
19
],
"end": {
"line": 1,
"column": 19
}
},
"range": [
0,
19
],
"sourceType": "module",
"body": [
{
"type": "DeclareModule",
"start": 0,
"end": 19,
"loc": {
"start": {
"line": 1,
"column": 17
"column": 0
},
"end": {
"line": 1,
"column": 19
}
}
},
"range": [
0,
19
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 19
"range": [
0,
19
],
"id": {
"type": "Identifier",
"start": 15,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 16
}
},
"range": [
15,
16
],
"name": "A"
},
"body": {
"type": "BlockStatement",
"start": 17,
"end": 19,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 19
}
},
"range": [
17,
19
],
"body": []
}
}
}
]
]
}
}

View File

@@ -1,59 +1,102 @@
{
"type": "Program",
"body": [
{
"type": "DeclareModule",
"id": {
"type": "Literal",
"value": "./a/b.js",
"raw": "\"./a/b.js\"",
"range": [
15,
25
],
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 25
}
}
"type": "File",
"start": 0,
"end": 28,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 28
}
},
"range": [
0,
28
],
"program": {
"type": "Program",
"start": 0,
"end": 28,
"loc": {
"start": {
"line": 1,
"column": 0
},
"body": {
"type": "BlockStatement",
"body": [],
"range": [
26,
28
],
"end": {
"line": 1,
"column": 28
}
},
"range": [
0,
28
],
"sourceType": "module",
"body": [
{
"type": "DeclareModule",
"start": 0,
"end": 28,
"loc": {
"start": {
"line": 1,
"column": 26
"column": 0
},
"end": {
"line": 1,
"column": 28
}
}
},
"range": [
0,
28
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 28
"range": [
0,
28
],
"id": {
"type": "Literal",
"start": 15,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 25
}
},
"range": [
15,
25
],
"value": "./a/b.js",
"rawValue": "./a/b.js",
"raw": "\"./a/b.js\""
},
"body": {
"type": "BlockStatement",
"start": 26,
"end": 28,
"loc": {
"start": {
"line": 1,
"column": 26
},
"end": {
"line": 1,
"column": 28
}
},
"range": [
26,
28
],
"body": []
}
}
}
]
]
}
}

View File

@@ -1,128 +1,178 @@
{
"type": "Program",
"body": [
{
"type": "DeclareModule",
"id": {
"type": "Identifier",
"name": "A",
"range": [
15,
16
],
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 16
}
}
"type": "File",
"start": 0,
"end": 43,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 43
}
},
"range": [
0,
43
],
"program": {
"type": "Program",
"start": 0,
"end": 43,
"loc": {
"start": {
"line": 1,
"column": 0
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "DeclareVariable",
"id": {
"type": "Identifier",
"name": "x",
"typeAnnotation": {
"type": "TypeAnnotation",
"typeAnnotation": {
"type": "NumberTypeAnnotation",
"range": [
34,
40
],
"loc": {
"start": {
"line": 1,
"column": 34
},
"end": {
"line": 1,
"column": 40
}
}
},
"range": [
32,
40
],
"loc": {
"start": {
"line": 1,
"column": 32
},
"end": {
"line": 1,
"column": 40
}
}
},
"range": [
31,
40
],
"loc": {
"start": {
"line": 1,
"column": 31
},
"end": {
"line": 1,
"column": 40
}
}
},
"range": [
19,
41
],
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 41
}
}
}
],
"range": [
17,
43
],
"end": {
"line": 1,
"column": 43
}
},
"range": [
0,
43
],
"sourceType": "module",
"body": [
{
"type": "DeclareModule",
"start": 0,
"end": 43,
"loc": {
"start": {
"line": 1,
"column": 17
"column": 0
},
"end": {
"line": 1,
"column": 43
}
}
},
"range": [
0,
43
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 43
"range": [
0,
43
],
"id": {
"type": "Identifier",
"start": 15,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 16
}
},
"range": [
15,
16
],
"name": "A"
},
"body": {
"type": "BlockStatement",
"start": 17,
"end": 43,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 43
}
},
"range": [
17,
43
],
"body": [
{
"type": "DeclareVariable",
"start": 19,
"end": 41,
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 41
}
},
"range": [
19,
41
],
"id": {
"type": "Identifier",
"start": 31,
"end": 40,
"loc": {
"start": {
"line": 1,
"column": 31
},
"end": {
"line": 1,
"column": 40
}
},
"range": [
31,
40
],
"name": "x",
"typeAnnotation": {
"type": "TypeAnnotation",
"start": 32,
"end": 40,
"loc": {
"start": {
"line": 1,
"column": 32
},
"end": {
"line": 1,
"column": 40
}
},
"range": [
32,
40
],
"typeAnnotation": {
"type": "NumberTypeAnnotation",
"start": 34,
"end": 40,
"loc": {
"start": {
"line": 1,
"column": 34
},
"end": {
"line": 1,
"column": 40
}
},
"range": [
34,
40
]
}
}
}
}
]
}
}
}
]
]
}
}

View File

@@ -1,61 +1,139 @@
{
"type": "Program",
"body": [
{
"type": "DeclareModule",
"id": {
"type": "Identifier",
"name": "A",
"range": [
15,
16
],
"type": "File",
"start": 0,
"end": 52,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 52
}
},
"range": [
0,
52
],
"program": {
"type": "Program",
"start": 0,
"end": 52,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 52
}
},
"range": [
0,
52
],
"sourceType": "module",
"body": [
{
"type": "DeclareModule",
"start": 0,
"end": 52,
"loc": {
"start": {
"line": 1,
"column": 15
"column": 0
},
"end": {
"line": 1,
"column": 16
"column": 52
}
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "DeclareFunction",
"id": {
"type": "Identifier",
"name": "foo",
"typeAnnotation": {
"type": "TypeAnnotation",
"typeAnnotation": {
"type": "FunctionTypeAnnotation",
"params": [],
"returnType": {
"type": "NumberTypeAnnotation",
"range": [
43,
49
],
"loc": {
"start": {
"line": 1,
"column": 43
},
"end": {
"line": 1,
"column": 49
}
}
},
"range": [
0,
52
],
"id": {
"type": "Identifier",
"start": 15,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 16
}
},
"range": [
15,
16
],
"name": "A"
},
"body": {
"type": "BlockStatement",
"start": 17,
"end": 52,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 52
}
},
"range": [
17,
52
],
"body": [
{
"type": "DeclareFunction",
"start": 19,
"end": 50,
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 50
}
},
"range": [
19,
50
],
"id": {
"type": "Identifier",
"start": 36,
"end": 49,
"loc": {
"start": {
"line": 1,
"column": 36
},
"typeParameters": null,
"range": [
39,
49
],
"end": {
"line": 1,
"column": 49
}
},
"range": [
36,
49
],
"name": "foo",
"typeAnnotation": {
"type": "TypeAnnotation",
"start": 39,
"end": 49,
"loc": {
"start": {
"line": 1,
@@ -65,83 +143,58 @@
"line": 1,
"column": 49
}
}
},
"range": [
39,
49
],
"loc": {
"start": {
"line": 1,
"column": 39
},
"end": {
"line": 1,
"column": 49
"range": [
39,
49
],
"typeAnnotation": {
"type": "FunctionTypeAnnotation",
"start": 39,
"end": 49,
"loc": {
"start": {
"line": 1,
"column": 39
},
"end": {
"line": 1,
"column": 49
}
},
"range": [
39,
49
],
"typeParameters": null,
"params": [],
"rest": null,
"returnType": {
"type": "NumberTypeAnnotation",
"start": 43,
"end": 49,
"loc": {
"start": {
"line": 1,
"column": 43
},
"end": {
"line": 1,
"column": 49
}
},
"range": [
43,
49
]
}
}
}
},
"range": [
36,
49
],
"loc": {
"start": {
"line": 1,
"column": 36
},
"end": {
"line": 1,
"column": 49
}
}
},
"range": [
19,
50
],
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 50
}
}
}
],
"range": [
17,
52
],
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 52
}
}
},
"range": [
0,
52
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 52
]
}
}
}
]
]
}
}

View File

@@ -1,189 +1,246 @@
{
"type": "Program",
"body": [
{
"type": "DeclareModule",
"id": {
"type": "Identifier",
"name": "A",
"range": [
15,
16
],
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 16
}
}
"type": "File",
"start": 0,
"end": 55,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 55
}
},
"range": [
0,
55
],
"program": {
"type": "Program",
"start": 0,
"end": 55,
"loc": {
"start": {
"line": 1,
"column": 0
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "DeclareClass",
"id": {
"type": "Identifier",
"name": "B",
"range": [
33,
34
],
"loc": {
"start": {
"line": 1,
"column": 33
},
"end": {
"line": 1,
"column": 34
}
}
},
"typeParameters": null,
"body": {
"type": "ObjectTypeAnnotation",
"properties": [
{
"type": "ObjectTypeProperty",
"key": {
"type": "Identifier",
"name": "foo",
"range": [
37,
40
],
"loc": {
"start": {
"line": 1,
"column": 37
},
"end": {
"line": 1,
"column": 40
}
}
},
"value": {
"type": "FunctionTypeAnnotation",
"params": [],
"returnType": {
"type": "NumberTypeAnnotation",
"range": [
44,
50
],
"loc": {
"start": {
"line": 1,
"column": 44
},
"end": {
"line": 1,
"column": 50
}
}
},
"typeParameters": null,
"range": [
37,
50
],
"loc": {
"start": {
"line": 1,
"column": 37
},
"end": {
"line": 1,
"column": 50
}
}
},
"optional": false,
"range": [
37,
51
],
"loc": {
"start": {
"line": 1,
"column": 37
},
"end": {
"line": 1,
"column": 51
}
}
}
],
"indexers": [],
"callProperties": [],
"range": [
35,
53
],
"loc": {
"start": {
"line": 1,
"column": 35
},
"end": {
"line": 1,
"column": 53
}
}
},
"extends": [],
"range": [
19,
53
],
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 53
}
}
}
],
"range": [
17,
55
],
"end": {
"line": 1,
"column": 55
}
},
"range": [
0,
55
],
"sourceType": "module",
"body": [
{
"type": "DeclareModule",
"start": 0,
"end": 55,
"loc": {
"start": {
"line": 1,
"column": 17
"column": 0
},
"end": {
"line": 1,
"column": 55
}
}
},
"range": [
0,
55
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 55
"range": [
0,
55
],
"id": {
"type": "Identifier",
"start": 15,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 16
}
},
"range": [
15,
16
],
"name": "A"
},
"body": {
"type": "BlockStatement",
"start": 17,
"end": 55,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 55
}
},
"range": [
17,
55
],
"body": [
{
"type": "DeclareClass",
"start": 19,
"end": 53,
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 53
}
},
"range": [
19,
53
],
"id": {
"type": "Identifier",
"start": 33,
"end": 34,
"loc": {
"start": {
"line": 1,
"column": 33
},
"end": {
"line": 1,
"column": 34
}
},
"range": [
33,
34
],
"name": "B"
},
"typeParameters": null,
"extends": [],
"body": {
"type": "ObjectTypeAnnotation",
"start": 35,
"end": 53,
"loc": {
"start": {
"line": 1,
"column": 35
},
"end": {
"line": 1,
"column": 53
}
},
"range": [
35,
53
],
"callProperties": [],
"properties": [
{
"type": "ObjectTypeProperty",
"start": 37,
"end": 51,
"loc": {
"start": {
"line": 1,
"column": 37
},
"end": {
"line": 1,
"column": 51
}
},
"range": [
37,
51
],
"value": {
"type": "FunctionTypeAnnotation",
"start": 37,
"end": 50,
"loc": {
"start": {
"line": 1,
"column": 37
},
"end": {
"line": 1,
"column": 50
}
},
"range": [
37,
50
],
"params": [],
"rest": null,
"typeParameters": null,
"returnType": {
"type": "NumberTypeAnnotation",
"start": 44,
"end": 50,
"loc": {
"start": {
"line": 1,
"column": 44
},
"end": {
"line": 1,
"column": 50
}
},
"range": [
44,
50
]
}
},
"key": {
"type": "Identifier",
"start": 37,
"end": 40,
"loc": {
"start": {
"line": 1,
"column": 37
},
"end": {
"line": 1,
"column": 40
}
},
"range": [
37,
40
],
"name": "foo"
},
"optional": false
}
],
"indexers": []
}
}
]
}
}
}
]
]
}
}