{ "type": "File", "start": 0, "end": 141, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 9, "column": 1 } }, "program": { "type": "Program", "start": 0, "end": 141, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 9, "column": 1 } }, "sourceType": "script", "body": [ { "type": "FunctionDeclaration", "start": 0, "end": 141, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 9, "column": 1 } }, "id": { "type": "Identifier", "start": 9, "end": 12, "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 12 } }, "name": "bar" }, "generator": false, "expression": false, "params": [ { "type": "Identifier", "start": 13, "end": 16, "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 16 } }, "name": "foo" } ], "body": { "type": "BlockStatement", "start": 18, "end": 141, "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 9, "column": 1 } }, "body": [ { "type": "SwitchStatement", "start": 24, "end": 139, "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 8, "column": 5 } }, "discriminant": { "type": "Identifier", "start": 31, "end": 34, "loc": { "start": { "line": 2, "column": 11 }, "end": { "line": 2, "column": 14 } }, "name": "foo" }, "cases": [ { "type": "SwitchCase", "start": 61, "end": 68, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 15 } }, "consequent": [], "test": { "type": "NumericLiteral", "start": 66, "end": 67, "loc": { "start": { "line": 4, "column": 13 }, "end": { "line": 4, "column": 14 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1, "leadingComments": null }, "leadingComments": [ { "type": "CommentLine", "value": " foo", "start": 46, "end": 52, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 14 } } } ], "trailingComments": [ { "type": "CommentLine", "value": " falls through", "start": 81, "end": 97, "loc": { "start": { "line": 5, "column": 12 }, "end": { "line": 5, "column": 28 } } } ] }, { "type": "SwitchCase", "start": 106, "end": 133, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 7, "column": 19 } }, "consequent": [ { "type": "ExpressionStatement", "start": 126, "end": 133, "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 19 } }, "expression": { "type": "CallExpression", "start": 126, "end": 132, "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 18 } }, "callee": { "type": "Identifier", "start": 126, "end": 130, "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 16 } }, "name": "doIt" }, "arguments": [] } } ], "test": { "type": "NumericLiteral", "start": 111, "end": 112, "loc": { "start": { "line": 6, "column": 13 }, "end": { "line": 6, "column": 14 } }, "extra": { "rawValue": 2, "raw": "2" }, "value": 2, "leadingComments": null }, "leadingComments": [ { "type": "CommentLine", "value": " falls through", "start": 81, "end": 97, "loc": { "start": { "line": 5, "column": 12 }, "end": { "line": 5, "column": 28 } } } ] } ] } ], "directives": [] } } ], "directives": [] }, "comments": [ { "type": "CommentLine", "value": " foo", "start": 46, "end": 52, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 14 } } }, { "type": "CommentLine", "value": " falls through", "start": 81, "end": 97, "loc": { "start": { "line": 5, "column": 12 }, "end": { "line": 5, "column": 28 } } } ] }