Debian Codegraph @

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

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