Debian Codegraph @

packages/babel-parser/test/fixtures/flow/regression/issue-166/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":66,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":1,"index":66}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":66,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":1,"index":66}},
7 "sourceType": "module",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "FunctionDeclaration",
12 "start":0,"end":66,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":1,"index":66}},
13 "id": {
14 "type": "Identifier",
15 "start":10,"end":13,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":1,"column":13,"index":13},"identifierName":"foo"},
16 "name": "foo"
17 },
18 "generator": true,
19 "async": false,
20 "params": [],
21 "body": {
22 "type": "BlockStatement",
23 "start":16,"end":66,"loc":{"start":{"line":1,"column":16,"index":16},"end":{"line":4,"column":1,"index":66}},
24 "body": [
25 {
26 "type": "VariableDeclaration",
27 "start":20,"end":45,"loc":{"start":{"line":2,"column":2,"index":20},"end":{"line":2,"column":27,"index":45}},
28 "declarations": [
29 {
30 "type": "VariableDeclarator",
31 "start":26,"end":44,"loc":{"start":{"line":2,"column":8,"index":26},"end":{"line":2,"column":26,"index":44}},
32 "id": {
33 "type": "Identifier",
34 "start":26,"end":27,"loc":{"start":{"line":2,"column":8,"index":26},"end":{"line":2,"column":9,"index":27},"identifierName":"x"},
35 "name": "x"
36 },
37 "init": {
38 "type": "TypeCastExpression",
39 "start":31,"end":43,"loc":{"start":{"line":2,"column":13,"index":31},"end":{"line":2,"column":25,"index":43}},
40 "expression": {
41 "type": "YieldExpression",
42 "start":31,"end":38,"loc":{"start":{"line":2,"column":13,"index":31},"end":{"line":2,"column":20,"index":38}},
43 "delegate": false,
44 "argument": {
45 "type": "NumericLiteral",
46 "start":37,"end":38,"loc":{"start":{"line":2,"column":19,"index":37},"end":{"line":2,"column":20,"index":38}},
47 "extra": {
48 "rawValue": 5,
49 "raw": "5"
50 },
51 "value": 5
52 }
53 },
54 "typeAnnotation": {
55 "type": "TypeAnnotation",
56 "start":38,"end":43,"loc":{"start":{"line":2,"column":20,"index":38},"end":{"line":2,"column":25,"index":43}},
57 "typeAnnotation": {
58 "type": "AnyTypeAnnotation",
59 "start":40,"end":43,"loc":{"start":{"line":2,"column":22,"index":40},"end":{"line":2,"column":25,"index":43}}
60 }
61 },
62 "extra": {
63 "parenthesized": true,
64 "parenStart": 30
65 }
66 }
67 }
68 ],
69 "kind": "const"
70 },
71 {
72 "type": "ExpressionStatement",
73 "start":48,"end":64,"loc":{"start":{"line":3,"column":2,"index":48},"end":{"line":3,"column":18,"index":64}},
74 "expression": {
75 "type": "ConditionalExpression",
76 "start":48,"end":63,"loc":{"start":{"line":3,"column":2,"index":48},"end":{"line":3,"column":17,"index":63}},
77 "test": {
78 "type": "Identifier",
79 "start":48,"end":49,"loc":{"start":{"line":3,"column":2,"index":48},"end":{"line":3,"column":3,"index":49},"identifierName":"x"},
80 "name": "x"
81 },
82 "consequent": {
83 "type": "YieldExpression",
84 "start":52,"end":59,"loc":{"start":{"line":3,"column":6,"index":52},"end":{"line":3,"column":13,"index":59}},
85 "delegate": false,
86 "argument": {
87 "type": "NumericLiteral",
88 "start":58,"end":59,"loc":{"start":{"line":3,"column":12,"index":58},"end":{"line":3,"column":13,"index":59}},
89 "extra": {
90 "rawValue": 1,
91 "raw": "1"
92 },
93 "value": 1
94 }
95 },
96 "alternate": {
97 "type": "Identifier",
98 "start":62,"end":63,"loc":{"start":{"line":3,"column":16,"index":62},"end":{"line":3,"column":17,"index":63},"identifierName":"x"},
99 "name": "x"
100 }
101 }
102 }
103 ],
104 "directives": []
105 }
106 }
107 ],
108 "directives": []
109 }
110 }