Debian Codegraph @

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

raw
1 {
2 "type": "File",
3 "start":0,"end":54,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":10,"index":54}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":54,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":10,"index":54}},
7 "sourceType": "module",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "ExpressionStatement",
12 "start":44,"end":54,"loc":{"start":{"line":4,"column":0,"index":44},"end":{"line":4,"column":10,"index":54}},
13 "expression": {
14 "type": "CallExpression",
15 "start":44,"end":53,"loc":{"start":{"line":4,"column":0,"index":44},"end":{"line":4,"column":9,"index":53}},
16 "callee": {
17 "type": "Identifier",
18 "start":44,"end":47,"loc":{"start":{"line":4,"column":0,"index":44},"end":{"line":4,"column":3,"index":47},"identifierName":"foo"},
19 "name": "foo"
20 },
21 "typeArguments": {
22 "type": "TypeParameterInstantiation",
23 "start":47,"end":50,"loc":{"start":{"line":4,"column":3,"index":47},"end":{"line":4,"column":6,"index":50}},
24 "params": [
25 {
26 "type": "GenericTypeAnnotation",
27 "start":48,"end":49,"loc":{"start":{"line":4,"column":4,"index":48},"end":{"line":4,"column":5,"index":49}},
28 "typeParameters": null,
29 "id": {
30 "type": "Identifier",
31 "start":48,"end":49,"loc":{"start":{"line":4,"column":4,"index":48},"end":{"line":4,"column":5,"index":49},"identifierName":"x"},
32 "name": "x"
33 }
34 }
35 ]
36 },
37 "arguments": [
38 {
39 "type": "Identifier",
40 "start":51,"end":52,"loc":{"start":{"line":4,"column":7,"index":51},"end":{"line":4,"column":8,"index":52},"identifierName":"y"},
41 "name": "y"
42 }
43 ]
44 },
45 "leadingComments": [
46 {
47 "type": "CommentLine",
48 "value": " arbitrary comment",
49 "start":14,"end":34,"loc":{"start":{"line":2,"column":0,"index":14},"end":{"line":2,"column":20,"index":34}}
50 },
51 {
52 "type": "CommentLine",
53 "value": " @flow",
54 "start":35,"end":43,"loc":{"start":{"line":3,"column":0,"index":35},"end":{"line":3,"column":8,"index":43}}
55 }
56 ]
57 }
58 ],
59 "directives": [
60 {
61 "type": "Directive",
62 "start":0,"end":13,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":13,"index":13}},
63 "value": {
64 "type": "DirectiveLiteral",
65 "start":0,"end":12,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":12,"index":12}},
66 "extra": {
67 "rawValue": "use strict",
68 "raw": "'use strict'",
69 "expressionValue": "use strict"
70 },
71 "value": "use strict"
72 },
73 "trailingComments": [
74 {
75 "type": "CommentLine",
76 "value": " arbitrary comment",
77 "start":14,"end":34,"loc":{"start":{"line":2,"column":0,"index":14},"end":{"line":2,"column":20,"index":34}}
78 },
79 {
80 "type": "CommentLine",
81 "value": " @flow",
82 "start":35,"end":43,"loc":{"start":{"line":3,"column":0,"index":35},"end":{"line":3,"column":8,"index":43}}
83 }
84 ]
85 }
86 ]
87 },
88 "comments": [
89 {
90 "type": "CommentLine",
91 "value": " arbitrary comment",
92 "start":14,"end":34,"loc":{"start":{"line":2,"column":0,"index":14},"end":{"line":2,"column":20,"index":34}}
93 },
94 {
95 "type": "CommentLine",
96 "value": " @flow",
97 "start":35,"end":43,"loc":{"start":{"line":3,"column":0,"index":35},"end":{"line":3,"column":8,"index":43}}
98 }
99 ]
100 }