Debian Codegraph @

packages/babel-parser/test/fixtures/core/categorized/filename-specified/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":99,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":39,"index":99},"filename":"path/to/input-file.js"},
4 "program": {
5 "type": "Program",
6 "start":0,"end":99,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":39,"index":99},"filename":"path/to/input-file.js"},
7 "sourceType": "script",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "VariableDeclaration",
12 "start":60,"end":99,"loc":{"start":{"line":2,"column":0,"index":60},"end":{"line":2,"column":39,"index":99},"filename":"path/to/input-file.js"},
13 "declarations": [
14 {
15 "type": "VariableDeclarator",
16 "start":64,"end":98,"loc":{"start":{"line":2,"column":4,"index":64},"end":{"line":2,"column":38,"index":98},"filename":"path/to/input-file.js"},
17 "id": {
18 "type": "Identifier",
19 "start":64,"end":68,"loc":{"start":{"line":2,"column":4,"index":64},"end":{"line":2,"column":8,"index":68},"filename":"path/to/input-file.js","identifierName":"node"},
20 "name": "node"
21 },
22 "init": {
23 "type": "StringLiteral",
24 "start":71,"end":98,"loc":{"start":{"line":2,"column":11,"index":71},"end":{"line":2,"column":38,"index":98},"filename":"path/to/input-file.js"},
25 "extra": {
26 "rawValue": "shouldHaveFilenameLocProp",
27 "raw": "\"shouldHaveFilenameLocProp\""
28 },
29 "value": "shouldHaveFilenameLocProp"
30 }
31 }
32 ],
33 "kind": "var",
34 "leadingComments": [
35 {
36 "type": "CommentLine",
37 "value": " This comment should have a filename prop attached to loc",
38 "start":0,"end":59,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":59,"index":59},"filename":"path/to/input-file.js"}
39 }
40 ]
41 }
42 ],
43 "directives": []
44 },
45 "comments": [
46 {
47 "type": "CommentLine",
48 "value": " This comment should have a filename prop attached to loc",
49 "start":0,"end":59,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":59,"index":59},"filename":"path/to/input-file.js"}
50 }
51 ]
52 }