| 1 |
{ |
| 2 |
"type": "File", |
| 3 |
"start":0,"end":141,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":9,"column":1,"index":141}}, |
| 4 |
"program": { |
| 5 |
"type": "Program", |
| 6 |
"start":0,"end":141,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":9,"column":1,"index":141}}, |
| 7 |
"sourceType": "script", |
| 8 |
"interpreter": null, |
| 9 |
"body": [ |
| 10 |
{ |
| 11 |
"type": "FunctionDeclaration", |
| 12 |
"start":0,"end":141,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":9,"column":1,"index":141}}, |
| 13 |
"id": { |
| 14 |
"type": "Identifier", |
| 15 |
"start":9,"end":12,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":12,"index":12},"identifierName":"bar"}, |
| 16 |
"name": "bar" |
| 17 |
}, |
| 18 |
"generator": false, |
| 19 |
"async": false, |
| 20 |
"params": [ |
| 21 |
{ |
| 22 |
"type": "Identifier", |
| 23 |
"start":13,"end":16,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":16,"index":16},"identifierName":"foo"}, |
| 24 |
"name": "foo" |
| 25 |
} |
| 26 |
], |
| 27 |
"body": { |
| 28 |
"type": "BlockStatement", |
| 29 |
"start":18,"end":141,"loc":{"start":{"line":1,"column":18,"index":18},"end":{"line":9,"column":1,"index":141}}, |
| 30 |
"body": [ |
| 31 |
{ |
| 32 |
"type": "SwitchStatement", |
| 33 |
"start":24,"end":139,"loc":{"start":{"line":2,"column":4,"index":24},"end":{"line":8,"column":5,"index":139}}, |
| 34 |
"discriminant": { |
| 35 |
"type": "Identifier", |
| 36 |
"start":31,"end":34,"loc":{"start":{"line":2,"column":11,"index":31},"end":{"line":2,"column":14,"index":34},"identifierName":"foo"}, |
| 37 |
"name": "foo" |
| 38 |
}, |
| 39 |
"cases": [ |
| 40 |
{ |
| 41 |
"type": "SwitchCase", |
| 42 |
"start":61,"end":68,"loc":{"start":{"line":4,"column":8,"index":61},"end":{"line":4,"column":15,"index":68}}, |
| 43 |
"consequent": [], |
| 44 |
"test": { |
| 45 |
"type": "NumericLiteral", |
| 46 |
"start":66,"end":67,"loc":{"start":{"line":4,"column":13,"index":66},"end":{"line":4,"column":14,"index":67}}, |
| 47 |
"extra": { |
| 48 |
"rawValue": 1, |
| 49 |
"raw": "1" |
| 50 |
}, |
| 51 |
"value": 1 |
| 52 |
}, |
| 53 |
"trailingComments": [ |
| 54 |
{ |
| 55 |
"type": "CommentLine", |
| 56 |
"value": " falls through", |
| 57 |
"start":81,"end":97,"loc":{"start":{"line":5,"column":12,"index":81},"end":{"line":5,"column":28,"index":97}} |
| 58 |
} |
| 59 |
], |
| 60 |
"leadingComments": [ |
| 61 |
{ |
| 62 |
"type": "CommentLine", |
| 63 |
"value": " foo", |
| 64 |
"start":46,"end":52,"loc":{"start":{"line":3,"column":8,"index":46},"end":{"line":3,"column":14,"index":52}} |
| 65 |
} |
| 66 |
] |
| 67 |
}, |
| 68 |
{ |
| 69 |
"type": "SwitchCase", |
| 70 |
"start":106,"end":133,"loc":{"start":{"line":6,"column":8,"index":106},"end":{"line":7,"column":19,"index":133}}, |
| 71 |
"consequent": [ |
| 72 |
{ |
| 73 |
"type": "ExpressionStatement", |
| 74 |
"start":126,"end":133,"loc":{"start":{"line":7,"column":12,"index":126},"end":{"line":7,"column":19,"index":133}}, |
| 75 |
"expression": { |
| 76 |
"type": "CallExpression", |
| 77 |
"start":126,"end":132,"loc":{"start":{"line":7,"column":12,"index":126},"end":{"line":7,"column":18,"index":132}}, |
| 78 |
"callee": { |
| 79 |
"type": "Identifier", |
| 80 |
"start":126,"end":130,"loc":{"start":{"line":7,"column":12,"index":126},"end":{"line":7,"column":16,"index":130},"identifierName":"doIt"}, |
| 81 |
"name": "doIt" |
| 82 |
}, |
| 83 |
"arguments": [] |
| 84 |
} |
| 85 |
} |
| 86 |
], |
| 87 |
"test": { |
| 88 |
"type": "NumericLiteral", |
| 89 |
"start":111,"end":112,"loc":{"start":{"line":6,"column":13,"index":111},"end":{"line":6,"column":14,"index":112}}, |
| 90 |
"extra": { |
| 91 |
"rawValue": 2, |
| 92 |
"raw": "2" |
| 93 |
}, |
| 94 |
"value": 2 |
| 95 |
}, |
| 96 |
"leadingComments": [ |
| 97 |
{ |
| 98 |
"type": "CommentLine", |
| 99 |
"value": " falls through", |
| 100 |
"start":81,"end":97,"loc":{"start":{"line":5,"column":12,"index":81},"end":{"line":5,"column":28,"index":97}} |
| 101 |
} |
| 102 |
] |
| 103 |
} |
| 104 |
] |
| 105 |
} |
| 106 |
], |
| 107 |
"directives": [] |
| 108 |
} |
| 109 |
} |
| 110 |
], |
| 111 |
"directives": [] |
| 112 |
}, |
| 113 |
"comments": [ |
| 114 |
{ |
| 115 |
"type": "CommentLine", |
| 116 |
"value": " foo", |
| 117 |
"start":46,"end":52,"loc":{"start":{"line":3,"column":8,"index":46},"end":{"line":3,"column":14,"index":52}} |
| 118 |
}, |
| 119 |
{ |
| 120 |
"type": "CommentLine", |
| 121 |
"value": " falls through", |
| 122 |
"start":81,"end":97,"loc":{"start":{"line":5,"column":12,"index":81},"end":{"line":5,"column":28,"index":97}} |
| 123 |
} |
| 124 |
] |
| 125 |
} |