Debian Codegraph @

packages/babel-parser/test/fixtures/es2015/statements/label-invalid-func-strict/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":53,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":53,"index":53}},
4 "errors": [
5 "SyntaxError: In strict mode code, functions can only be declared at top level or inside a block. (1:35)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":53,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":53,"index":53}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "FunctionDeclaration",
15 "start":0,"end":53,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":53,"index":53}},
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 "body": {
25 "type": "BlockStatement",
26 "start":15,"end":53,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":53,"index":53}},
27 "body": [
28 {
29 "type": "LabeledStatement",
30 "start":30,"end":52,"loc":{"start":{"line":1,"column":30,"index":30},"end":{"line":1,"column":52,"index":52}},
31 "body": {
32 "type": "FunctionDeclaration",
33 "start":35,"end":52,"loc":{"start":{"line":1,"column":35,"index":35},"end":{"line":1,"column":52,"index":52}},
34 "id": {
35 "type": "Identifier",
36 "start":44,"end":47,"loc":{"start":{"line":1,"column":44,"index":44},"end":{"line":1,"column":47,"index":47},"identifierName":"baz"},
37 "name": "baz"
38 },
39 "generator": false,
40 "async": false,
41 "params": [],
42 "body": {
43 "type": "BlockStatement",
44 "start":50,"end":52,"loc":{"start":{"line":1,"column":50,"index":50},"end":{"line":1,"column":52,"index":52}},
45 "body": [],
46 "directives": []
47 }
48 },
49 "label": {
50 "type": "Identifier",
51 "start":30,"end":33,"loc":{"start":{"line":1,"column":30,"index":30},"end":{"line":1,"column":33,"index":33},"identifierName":"bar"},
52 "name": "bar"
53 }
54 }
55 ],
56 "directives": [
57 {
58 "type": "Directive",
59 "start":16,"end":29,"loc":{"start":{"line":1,"column":16,"index":16},"end":{"line":1,"column":29,"index":29}},
60 "value": {
61 "type": "DirectiveLiteral",
62 "start":16,"end":28,"loc":{"start":{"line":1,"column":16,"index":16},"end":{"line":1,"column":28,"index":28}},
63 "extra": {
64 "rawValue": "use strict",
65 "raw": "\"use strict\"",
66 "expressionValue": "use strict"
67 },
68 "value": "use strict"
69 }
70 }
71 ]
72 }
73 }
74 ],
75 "directives": []
76 }
77 }