Debian Codegraph @

packages/babel-parser/test/fixtures/flow/predicates/5/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":61,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":61}},
4 "errors": [
5 "SyntaxError: Spaces between `%` and `checks` are not allowed here. (1:17)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":61,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":61}},
10 "sourceType": "module",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "FunctionDeclaration",
15 "start":0,"end":61,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":61}},
16 "id": {
17 "type": "Identifier",
18 "start":9,"end":12,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":12,"index":12},"identifierName":"foo"},
19 "name": "foo"
20 },
21 "generator": false,
22 "async": false,
23 "params": [
24 {
25 "type": "Identifier",
26 "start":13,"end":14,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":14,"index":14},"identifierName":"x"},
27 "name": "x"
28 }
29 ],
30 "predicate": {
31 "type": "InferredPredicate",
32 "start":17,"end":25,"loc":{"start":{"line":1,"column":17,"index":17},"end":{"line":1,"column":25,"index":25}}
33 },
34 "returnType": null,
35 "body": {
36 "type": "BlockStatement",
37 "start":26,"end":61,"loc":{"start":{"line":1,"column":26,"index":26},"end":{"line":3,"column":1,"index":61}},
38 "body": [
39 {
40 "type": "ReturnStatement",
41 "start":30,"end":59,"loc":{"start":{"line":2,"column":2,"index":30},"end":{"line":2,"column":31,"index":59}},
42 "argument": {
43 "type": "BinaryExpression",
44 "start":37,"end":58,"loc":{"start":{"line":2,"column":9,"index":37},"end":{"line":2,"column":30,"index":58}},
45 "left": {
46 "type": "UnaryExpression",
47 "start":37,"end":45,"loc":{"start":{"line":2,"column":9,"index":37},"end":{"line":2,"column":17,"index":45}},
48 "operator": "typeof",
49 "prefix": true,
50 "argument": {
51 "type": "Identifier",
52 "start":44,"end":45,"loc":{"start":{"line":2,"column":16,"index":44},"end":{"line":2,"column":17,"index":45},"identifierName":"x"},
53 "name": "x"
54 }
55 },
56 "operator": "===",
57 "right": {
58 "type": "StringLiteral",
59 "start":50,"end":58,"loc":{"start":{"line":2,"column":22,"index":50},"end":{"line":2,"column":30,"index":58}},
60 "extra": {
61 "rawValue": "string",
62 "raw": "\"string\""
63 },
64 "value": "string"
65 }
66 }
67 }
68 ],
69 "directives": []
70 }
71 }
72 ],
73 "directives": []
74 }
75 }